[Liblas-commits] hg: 2 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Sat Oct 23 20:18:53 EDT 2010


changeset 4ddd36c5b69d in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=4ddd36c5b69d
summary: Added emacs temp files to .hgignore

changeset 557cadae16a1 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=557cadae16a1
summary: Re-style CMakeLists.txt according to CMake common.

diffstat:

 .hgignore      |    3 +-
 CMakeLists.txt |  268 ++++++++++++++++++++++++++++----------------------------
 2 files changed, 137 insertions(+), 134 deletions(-)

diffs (truncated from 403 to 300 lines):

diff -r dcf89ead4b25 -r 557cadae16a1 .hgignore
--- a/.hgignore	Thu Oct 21 14:04:36 2010 +0100
+++ b/.hgignore	Sun Oct 24 01:18:25 2010 +0100
@@ -1,5 +1,6 @@
 syntax: glob
 *~
+\#*
 *.bak
 *.dll
 *.dll.manifest
@@ -94,4 +95,4 @@
 README.txt
 osgeo4w/
 test/data/Autzen_Stadium/
-DartConfiguration.tcl
\ No newline at end of file
+DartConfiguration.tcl
diff -r dcf89ead4b25 -r 557cadae16a1 CMakeLists.txt
--- a/CMakeLists.txt	Thu Oct 21 14:04:36 2010 +0100
+++ b/CMakeLists.txt	Sun Oct 24 01:18:25 2010 +0100
@@ -9,18 +9,17 @@
 project(libLAS)
 
 if(WIN32)
-    # Name of C++ library
-    set(LIBLAS_LIB_NAME liblas)
+  # Name of C++ library
+  set(LIBLAS_LIB_NAME liblas)
 
-    # Name of C library
-    set(LIBLAS_C_LIB_NAME liblas_c)
+  # Name of C library
+  set(LIBLAS_C_LIB_NAME liblas_c)
 else()
-    # Name of C++ library
-    set(LIBLAS_LIB_NAME las)
-
-    # Name of C library
-    set(LIBLAS_C_LIB_NAME las_c)
-
+  # Name of C++ library
+  set(LIBLAS_LIB_NAME las)
+  
+  # Name of C library
+  set(LIBLAS_C_LIB_NAME las_c)
 endif()
 
 # Name of test suite runner
@@ -35,7 +34,7 @@
 # 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")
+  "Enable CTest to support submissions of results to CDash at http://cdash.org")
 
 ###############################################################################
 # CMake settings
@@ -55,7 +54,7 @@
 # Default to release mode 
 if(NOT MSVC_IDE)
   set(CMAKE_BUILD_TYPE Release CACHE STRING 
-      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel")
+    "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel")
 endif()
 
 # TODO: Still testing the output paths --mloskot
@@ -77,47 +76,48 @@
 # 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)
-            add_definitions(-D_SECURE_SCL=0)
-        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()
+  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)
+      add_definitions(-D_SECURE_SCL=0)
+    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 project configuration")
-        mark_as_advanced(MSVC_ENVIRONMENT_PATH)
-        set(VCPROJ_USER_ENVIRONMENT_PATH_DEBUG "${ENVIRONMENT_PATH}")
-        mark_as_advanced(VCPROJ_USER_ENVIRONMENT_PATH_DEBUG)
+    # 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()
+else()
+  if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+    
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wno-long-long -ansi")
+    if (CMAKE_COMPILER_IS_GNUCXX)
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
     endif()
-else()
-    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        
-        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wno-long-long -ansi")
-        if (CMAKE_COMPILER_IS_GNUCXX)
-            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
-        endif()
-    endif()
+  endif()
 endif(WIN32)
 
 if (APPLE)
-    set(SO_EXT dylib)
-    set(CMAKE_FIND_FRAMEWORK "LAST")
+  set(SO_EXT dylib)
+  set(CMAKE_FIND_FRAMEWORK "LAST")
 elseif(WIN32)
-    set(SO_EXT dll)
+  set(SO_EXT dll)
 else()
-    set(SO_EXT so)
+  set(SO_EXT so)
 endif(APPLE)
 
 ###############################################################################
@@ -143,109 +143,112 @@
 set(WITH_GEOTIFF FALSE CACHE BOOL "Choose if GeoTIFF support should be built")
 
 if(WITH_GEOTIFF)
-    find_package(GeoTIFF 1.2.5)
+  find_package(GeoTIFF 1.2.5)
 
-    if(GEOTIFF_FOUND)
+  if(GEOTIFF_FOUND)
     
-        # Confirm required API is available
-        include(CheckFunctionExists) 
-        set(CMAKE_REQUIRED_LIBRARIES ${GEOTIFF_LIBRARY})
-#       check_function_exists(ST_Create HAVE_ST_CREATE)
+    # 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()
+    #        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)
+
+    find_package(TIFF) 
+    mark_as_advanced(CLEAR TIFF_INCLUDE_DIR) 
+    mark_as_advanced(CLEAR TIFF_LIBRARIES) 
+    if (TIFF_FOUND)
+      include_directories(${TIFF_INCLUDE_DIR})
     endif()
-
-    # Determine libTIFF availability, required
-    if (GEOTIFF_FOUND)
-
-        find_package(TIFF) 
-        mark_as_advanced(CLEAR TIFF_INCLUDE_DIR) 
-        mark_as_advanced(CLEAR TIFF_LIBRARIES) 
-        if (TIFF_FOUND)
-            include_directories(${TIFF_INCLUDE_DIR})
-        endif()
-    endif()
+  endif()
 endif()
 
 # GDAL/OGR support - optional, default=OFF
 set(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built")
 
 if(WITH_GDAL)
-    if (NOT GEOTIFF_FOUND)
-        message(FATAL_ERROR "GDAL support requires GeoTIFF library which was not selected")
+  if (NOT GEOTIFF_FOUND)
+    message(FATAL_ERROR
+      "GDAL support requires GeoTIFF library which was not selected")
+  endif()
+
+  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()
-
-    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()
+  endif()
 endif()
 
 # Oracle support - optional, default=OFF
 set(WITH_ORACLE FALSE CACHE BOOL "Choose if Oracle support should be built")
 
 if(WITH_ORACLE)
-    find_package(Oracle)
+  find_package(Oracle)
 
-    if(ORACLE_FOUND)
-        include_directories(${ORACLE_INCLUDE_DIR})
-        add_definitions(-DHAVE_ORACLE=1)
-    endif()
+  if(ORACLE_FOUND)
+    include_directories(${ORACLE_INCLUDE_DIR})
+    add_definitions(-DHAVE_ORACLE=1)
+  endif()
 endif()
 
 ###############################################################################
 # Installation settings
 
 if(WIN32)
-    set(DEFAULT_LIB_SUBDIR lib)
-    set(DEFAULT_DATA_SUBDIR .)
-    set(DEFAULT_INCLUDE_SUBDIR include)
+  set(DEFAULT_LIB_SUBDIR lib)
+  set(DEFAULT_DATA_SUBDIR .)
+  set(DEFAULT_INCLUDE_SUBDIR include)
 
-    if (MSVC)
-        set(DEFAULT_BIN_SUBDIR bin)
-    else()
-        set(DEFAULT_BIN_SUBDIR .)
-    endif()
+  if (MSVC)
+    set(DEFAULT_BIN_SUBDIR bin)
+  else()
+    set(DEFAULT_BIN_SUBDIR .)
+  endif()
 else()
-    # Common locatoins for Unix and Mac OS X
-    set(DEFAULT_BIN_SUBDIR bin)
-    set(DEFAULT_LIB_SUBDIR lib)
-    set(DEFAULT_DATA_SUBDIR share/liblas)
-    set(DEFAULT_INCLUDE_SUBDIR include)
+  # Common locatoins for Unix and Mac OS X


More information about the Liblas-commits mailing list