[Liblas-commits] hg: LASzip should be optional, not required

liblas-commits at liblas.org liblas-commits at liblas.org
Fri Jul 1 13:28:36 EDT 2011


details:   http://hg.liblas.orghg/rev/a1a0a7014028
changeset: 3062:a1a0a7014028
user:      Howard Butler <hobu.inc at gmail.com>
date:      Fri Jul 01 12:28:28 2011 -0500
description:
LASzip should be optional, not required

diffstat:

 CMakeLists.txt |  21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diffs (33 lines):

diff -r 08f64fd1e2a1 -r a1a0a7014028 CMakeLists.txt
--- a/CMakeLists.txt	Fri Jul 01 10:11:48 2011 -0500
+++ b/CMakeLists.txt	Fri Jul 01 12:28:28 2011 -0500
@@ -197,18 +197,19 @@
 set(WITH_STATIC_LASZIP FALSE CACHE BOOL "Choose of LASzip should be statically linked")
 mark_as_advanced(WITH_STATIC_LASZIP)
 
-find_package(LASzip 2.0.0)
-if(LASZIP_FOUND)    
-    set(CMAKE_REQUIRED_LIBRARIES ${LASZIP_LIBRARY})
-    include_directories(${LASZIP_INCLUDE_DIR})
-    add_definitions(-DHAVE_LASZIP=1)
-    mark_as_advanced(CLEAR LASZIP_INCLUDE_DIR) 
-    mark_as_advanced(CLEAR LASZIP_LIBRARY) 
-    mark_as_advanced(CLEAR LASZIP_VERSION) 
-    set(WITH_LASZIP TRUE CACHE BOOL "Choose if LASzip support should be built" FORCE)
+if (WITH_LASZIP)
+    find_package(LASzip 2.0.1)
+
+    if(LASZIP_FOUND)    
+        set(CMAKE_REQUIRED_LIBRARIES ${LASZIP_LIBRARY})
+        include_directories(${LASZIP_INCLUDE_DIR})
+        add_definitions(-DHAVE_LASZIP=1)
+        mark_as_advanced(CLEAR LASZIP_INCLUDE_DIR) 
+        mark_as_advanced(CLEAR LASZIP_LIBRARY) 
+        mark_as_advanced(CLEAR LASZIP_VERSION) 
+    endif()
 endif()
 
-
 # GDAL/OGR support - optional, default=OFF
 set(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built")
 


More information about the Liblas-commits mailing list