[Liblas-commits] libpc: credits
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Feb 9 15:46:45 EST 2011
details: http://hg.liblas.orglibpc/rev/919c0ec2618d
changeset: 18:919c0ec2618d
user: Michael P. Gerlek <mpg at flaxen.com>
date: Wed Feb 09 12:16:44 2011 -0800
description:
credits
Subject: libpc: 0.1
details: http://hg.liblas.orglibpc/rev/2e3492ec00a6
changeset: 19:2e3492ec00a6
user: Michael P. Gerlek <mpg at flaxen.com>
date: Wed Feb 09 12:18:11 2011 -0800
description:
0.1
Subject: libpc: removed
details: http://hg.liblas.orglibpc/rev/8914da21e2d7
changeset: 20:8914da21e2d7
user: Michael P. Gerlek <mpg at flaxen.com>
date: Wed Feb 09 12:25:04 2011 -0800
description:
removed
Subject: libpc: copy of cmake files from liblas
details: http://hg.liblas.orglibpc/rev/fcee5a583ae7
changeset: 21:fcee5a583ae7
user: Michael P. Gerlek <mpg at flaxen.com>
date: Wed Feb 09 12:25:21 2011 -0800
description:
copy of cmake files from liblas
Subject: libpc: copied from liblas
details: http://hg.liblas.orglibpc/rev/615db25be65b
changeset: 22:615db25be65b
user: Michael P. Gerlek <mpg at flaxen.com>
date: Wed Feb 09 12:33:36 2011 -0800
description:
copied from liblas
diffstat:
AUTHORS.txt | 12 +
CMakeLists.txt | 438 +++++++++++++++++++++++++++++++++++
LICENSE.txt | 48 +++
VERSION.txt | 1 +
cmake/libPC.vcproj.user.template | 121 +++++++++
cmake/modules/BuildOSGeo4W.cmake | 152 ++++++++++++
cmake/modules/FindGDAL.cmake | 187 ++++++++++++++
cmake/modules/FindGeoTIFF.cmake | 93 +++++++
cmake/modules/FindLASzip.cmake | 103 ++++++++
cmake/modules/FindOracle.cmake | 83 ++++++
cmake/modules/FindSpatialIndex.cmake | 101 ++++++++
copyright.txt | 33 --
mpg-config.bat | 38 +++
13 files changed, 1377 insertions(+), 33 deletions(-)
diffs (truncated from 1464 to 300 lines):
diff -r 099246b5c27e -r 615db25be65b AUTHORS.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/AUTHORS.txt Wed Feb 09 12:33:36 2011 -0800
@@ -0,0 +1,12 @@
+The libPC team acknowledges and thanks the following people and companies for
+their contributions to this project. The open source community appreciates
+their efforts.
+
+
+Howard Butler
+ Hobu, Inc.
+ hobu.inc at gmail.com
+
+Michael P. Gerlek
+ Flaxen Geo Consulting
+ mpg at flaxen.com
diff -r 099246b5c27e -r 615db25be65b CMakeLists.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/CMakeLists.txt Wed Feb 09 12:33:36 2011 -0800
@@ -0,0 +1,438 @@
+###############################################################################
+# Main CMake configuration file for libLAS
+#
+# Author: Mateusz Loskot <mateusz at loskot.net>
+#
+#
+###############################################################################
+# libLAS general settings
+project(libLAS)
+
+
+SET(LIBLAS_VERSION_MAJOR "1")
+SET(LIBLAS_VERSION_MINOR "6")
+SET(LIBLAS_VERSION_PATCH "0")
+set(VERSION "${LIBLAS_VERSION_MAJOR}.${LIBLAS_VERSION_MINOR}.${LIBLAS_VERSION_PATCH}")
+SET(LIBLAS_LIB_SOVERSION "2.0.0")
+SET(LIBLAS_C_LIB_SOVERSION "2.0.0")
+SET(OSGEO4W_UPSTREAM_RELEASE "1")
+
+if(WIN32)
+ # Name of C++ library
+ set(LIBLAS_LIB_NAME liblas)
+
+ # Name of C library
+ set(LIBLAS_C_LIB_NAME liblas_c)
+
+ # Name of Chipper library
+ set(LASCHIP_LIB_NAME liblas_chipper )
+
+ # Name of Kernel libray
+ set(LASKERNEL_LIB_NAME liblas_kernel )
+
+else()
+ # Name of C++ library
+ set(LIBLAS_LIB_NAME las)
+
+ # Name of C library
+ set(LIBLAS_C_LIB_NAME las_c)
+
+ # Name of Chipper library
+ set(LASCHIP_LIB_NAME las_chipper )
+
+ # Name of Kernel libray
+ set(LASKERNEL_LIB_NAME las_kernel )
+endif()
+
+# Name of test suite runner
+set(LIBLAS_UNIT_TEST liblas_test)
+
+set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
+
+# Choose package components
+set(WITH_UTILITIES TRUE CACHE BOOL "Choose if libLAS utilities should be built")
+set(WITH_TESTS TRUE CACHE BOOL "Choose if libLAS unit tests should be built")
+
+# Choose to use pkg-config or not
+set(WITH_PKGCONFIG FALSE CACHE BOOL
+ "Choose whether a pkgconfig file (libLAS.pc) should be installed")
+
+set(WITH_ENDIANAWARE FALSE CACHE BOOL "Choose whether or not libLAS should do runtime endianness switching. Note that this can slow things down considerably if enabled by default")
+
+# Enable CTest and submissions to libLAS dashboard at CDash
+# http://my.cdash.org/index.php?project=libLAS
+set(ENABLE_CTEST FALSE CACHE BOOL
+ "Enable CTest to support submissions of results to CDash at http://cdash.org")
+
+###############################################################################
+# CMake settings
+cmake_minimum_required(VERSION 2.6.0)
+
+set(CMAKE_COLOR_MAKEFILE ON)
+
+# Allow advanced users to generate Makefiles printing detailed commands
+mark_as_advanced(CMAKE_VERBOSE_MAKEFILE)
+
+# Path to additional CMake modules
+set(CMAKE_MODULE_PATH ${libLAS_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
+
+###############################################################################
+# General build settings
+
+# Default to debug mode until final 1.6.0 release
+if(NOT MSVC_IDE)
+ if(NOT CMAKE_BUILD_TYPE)
+
+ set(CMAKE_BUILD_TYPE Debug CACHE STRING
+ "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel" FORCE)
+ endif()
+ message(STATUS "Setting libLAS build type - ${CMAKE_BUILD_TYPE}")
+endif()
+
+# TODO: Still testing the output paths --mloskot
+set(LIBLAS_BUILD_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE})
+
+# Output directory in which to build RUNTIME target files.
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY})
+
+# Output directory in which to build LIBRARY target files
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY})
+
+# Output directory in which to build ARCHIVE target files.
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBLAS_BUILD_OUTPUT_DIRECTORY})
+
+file(READ "doc/index.txt" README )
+file(WRITE "README.txt" "${README}")
+
+###############################################################################
+# Platform and compiler specific settings
+
+if(WIN32)
+ if (MSVC)
+ if (MSVC80 OR MSVC90 OR MSVC10)
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+ add_definitions(-D_CRT_NONSTDC_NO_WARNING)
+ add_definitions(-D_SCL_SECURE_NO_WARNINGS)
+ endif()
+
+ if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
+ string(REGEX REPLACE "/W[0-4]" "/W4"
+ CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
+ endif()
+
+ # Generate dot-user file with user-specific settings for
+ # Visual Studio project
+ set(MSVC_ENVIRONMENT_PATH "" CACHE STRING
+ "Custom PATH for Environment property in Visual Studio for project")
+ mark_as_advanced(MSVC_ENVIRONMENT_PATH)
+ set(VCPROJ_USER_ENVIRONMENT_PATH_DEBUG "${ENVIRONMENT_PATH}")
+ mark_as_advanced(VCPROJ_USER_ENVIRONMENT_PATH_DEBUG)
+
+ endif()
+
+ set(CMAKE_INCLUDE_PATH c:/osgeo4w/include;$ENV{CMAKE_INCLUDE_PATH})
+ set(CMAKE_LIBRARY_PATH c:/osgeo4w/lib;$ENV{CMAKE_LIBRARY_PATH})
+else()
+
+ # Recommended C++ compilation flags
+ # -Weffc++
+ set(LIBLAS_COMMON_CXX_FLAGS
+ "-pedantic -ansi -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wredundant-decls -Wno-long-long")
+
+ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBLAS_COMMON_CXX_FLAGS}")
+ if (CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
+ endif()
+
+ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER}" MATCHES "clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBLAS_COMMON_CXX_FLAGS}")
+ endif()
+endif(WIN32)
+
+if (APPLE)
+ set(SO_EXT dylib)
+ set(CMAKE_FIND_FRAMEWORK "LAST")
+elseif(WIN32)
+ set(SO_EXT dll)
+else()
+ set(SO_EXT so)
+endif(APPLE)
+
+###############################################################################
+# Search for dependencies
+
+# Boost C++ Libraries support - required
+message(STATUS "Searching for Boost 1.38+ - done")
+
+# Default to using static, multithreaded libraries for
+# linking under MSVC. This is because we show users how to
+# use boostpro.com installer and install those options when linking
+# on windows in the compilation documentation.
+if(WIN32)
+ if (MSVC)
+ set(Boost_USE_STATIC_LIBS ON)
+ set(Boost_USE_MULTITHREADED ON)
+ endif(MSVC)
+endif(WIN32)
+
+# NOTE: Add iostreams to COMPONENTS list to enable bigfile_boost_iostreams_test
+find_package(Boost 1.38 COMPONENTS program_options thread REQUIRED)
+
+if(Boost_FOUND AND Boost_PROGRAM_OPTIONS_FOUND)
+ include_directories(${Boost_INCLUDE_DIRS})
+endif()
+
+# make these available for the user to set.
+mark_as_advanced(CLEAR Boost_INCLUDE_DIR)
+mark_as_advanced(CLEAR Boost_LIBRARY_DIRS)
+link_directories(${Boost_LIBRARY_DIRS})
+
+
+
+# libxml2 support - optional, default=ON
+set(WITH_LIBXML2 FALSE CACHE BOOL "Choose if libxml2 support should be built ")
+
+if(WITH_LIBXML2)
+ find_package(LibXml2)
+ mark_as_advanced(CLEAR LIBXML2_INCLUDE_DIR)
+ mark_as_advanced(CLEAR LIBXML2_LIBRARIES)
+ if(LIBXML2_FOUND)
+ include_directories(${LIBXML2_INCLUDE_DIR})
+ add_definitions(-DHAVE_LIBXML2=1)
+ endif()
+endif()
+
+# GDAL/OGR support - optional, default=OFF
+set(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built")
+
+if(WITH_GDAL)
+
+ find_package(GDAL 1.6.0)
+
+ # if(GDAL_FOUND)
+ # # Confirm required API is available
+ # include(CheckFunctionExists)
+ # set(CMAKE_REQUIRED_LIBRARIES ${GDAL_LIBRARY})
+ # check_function_exists(OSRSetEquirectangular2 HAVE_OSRSETEQUIRECTANGULAR2)
+ #
+ # if(NOT HAVE_OSRSETEQUIRECTANGULAR2)
+ # # Reset to NOT found for GDAL/OGR
+ # set(GDAL_FOUND)
+ # message(FATAL_ERROR
+ # "Unable to find OSRSetEquirectangular2 within GDAL library at ${GDAL_INCLUDE_DIR} ${GDAL_LIBRARY}")
+ # else()
+ include_directories(${GDAL_INCLUDE_DIR})
+ add_definitions(-DHAVE_GDAL=1)
+ # endif()
+ # endif()
+
+ mark_as_advanced(CLEAR GDAL_INCLUDE_DIR)
+ mark_as_advanced(CLEAR GDAL_LIBRARY)
+
+endif()
+
+# GeoTIFF support - optional, default=OFF
+set(WITH_GEOTIFF FALSE CACHE BOOL "Choose if GeoTIFF support should be built")
+
+if(WITH_GEOTIFF)
+ find_package(GeoTIFF 1.2.5)
+
+ if(GEOTIFF_FOUND)
+
+ # Confirm required API is available
+ include(CheckFunctionExists)
+ set(CMAKE_REQUIRED_LIBRARIES ${GEOTIFF_LIBRARY})
+ # check_function_exists(ST_Create HAVE_ST_CREATE)
+
+ # if(NOT HAVE_ST_CREATE)
+ # set(GEOTIFF_FOUND) # Reset to NOT found for GeoTIFF
+ # message(FATAL_ERROR "GeoTIFF support requires libgeotiff 1.2.5 or newer.")
+ # else()
+ include_directories(${GEOTIFF_INCLUDE_DIR})
+ add_definitions(-DHAVE_LIBGEOTIFF=1)
+ # endif()
+ endif()
+
+ # Determine libTIFF availability, required
+ if (GEOTIFF_FOUND)
+
+ mark_as_advanced(CLEAR TIFF_INCLUDE_DIR)
+ mark_as_advanced(CLEAR TIFF_LIBRARY)
+ if (WIN32)
+ set(TIFF_NAMES libtiff_i)
+ endif(WIN32)
+ find_package(TIFF)
+ if (TIFF_FOUND)
+ include_directories(${TIFF_INCLUDE_DIR})
+ endif()
+ endif()
+endif()
+
+if(WITH_GDAL)
+ if (NOT GEOTIFF_FOUND)
+ message(FATAL_ERROR
+ "GDAL support requires GeoTIFF library which was not selected")
+ endif()
More information about the Liblas-commits
mailing list