[Liblas-commits] r1192 - in trunk: . src test/unit

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Apr 9 10:32:34 EDT 2009


Author: mloskot
Date: Thu Apr  9 10:32:33 2009
New Revision: 1192
URL: http://liblas.org/changeset/1192

Log:
Updated CMake build configuration, so it is now possible to build libLAS using CMake with and without GeoTIFF support. Unit tests suite builds too.

Modified:
   trunk/CMakeLists.txt
   trunk/src/CMakeLists.txt
   trunk/test/unit/CMakeLists.txt

Modified: trunk/CMakeLists.txt
==============================================================================
--- trunk/CMakeLists.txt	(original)
+++ trunk/CMakeLists.txt	Thu Apr  9 10:32:33 2009
@@ -8,8 +8,8 @@
 #
 PROJECT( libLAS )
 
-SET( LIBLAS_LIB_NAME liblas )
-SET( LIBLAS_C_LIB_NAME liblas_c )
+SET( LIBLAS_LIB_NAME las )
+SET( LIBLAS_C_LIB_NAME las_c )
 
 #############################################################
 # CMake settings
@@ -35,7 +35,6 @@
 # Platform and compiler specific settings
 
 IF (WIN32)
-
     ADD_DEFINITIONS( /W4 )
 
     IF (MSVC)
@@ -44,17 +43,14 @@
             ADD_DEFINITIONS( /D_CRT_NONSTDC_NO_WARNING )
         ENDIF (MSVC80)
     ENDIF (MSVC)
-
 ELSE (WIN32)
 
     IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-
         ADD_DEFINITIONS( -Wall -Wno-long-long -pedantic -ansi )
 
         IF (CMAKE_COMPILER_IS_GNUCXX)
             SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98" )
         ENDIF (CMAKE_COMPILER_IS_GNUCXX)
-
     ENDIF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
 ENDIF (WIN32)
 

Modified: trunk/src/CMakeLists.txt
==============================================================================
--- trunk/src/CMakeLists.txt	(original)
+++ trunk/src/CMakeLists.txt	Thu Apr  9 10:32:33 2009
@@ -88,9 +88,15 @@
     ADD_DEFINITIONS( /Za )
 ENDIF (WIN32)
 
+# Configure GeoTIFF support (optional)
+IF (GEOTIFF_FOUND)
+    INCLUDE_DIRECTORIES( ${GEOTIFF_INCLUDE_DIR} )
+ELSE (GEOTIFF_FOUND)
+    SET(GEOTIFF_LIBRARY "")
+ENDIF (GEOTIFF_FOUND)
+
 INCLUDE_DIRECTORIES(
     ../include
-    ${GEOTIFF_INCLUDE_DIR}
 )
 
 # Static library with libLAS C++ core
@@ -102,3 +108,4 @@
 	${LIBLAS_LIB_NAME}
 	${GEOTIFF_LIBRARY}
 )
+

Modified: trunk/test/unit/CMakeLists.txt
==============================================================================
--- trunk/test/unit/CMakeLists.txt	(original)
+++ trunk/test/unit/CMakeLists.txt	Thu Apr  9 10:32:33 2009
@@ -13,6 +13,7 @@
     laspoint_test.cpp
     lasreader_iterator_test.cpp
     lasreader_test.cpp
+    lasspatialreference_test.cpp
     lasvariablerecord_test.cpp
     laswriter_test.cpp
     liblas_test_suite.cpp
@@ -25,7 +26,10 @@
 
 ADD_EXECUTABLE( ${LIBLAS_TEST} ${LIBLAS_TEST_SRC} )
 
-TARGET_LINK_LIBRARIES( ${LIBLAS_TEST} ${LIBLAS_LIB_NAME} )
+TARGET_LINK_LIBRARIES( ${LIBLAS_TEST} 
+    ${LIBLAS_LIB_NAME}
+    ${GEOTIFF_LIBRARY}
+)
 
 # TODO: Needs to tweak the executable path
 ADD_TEST(liblas_test ${EXECUTABLE_OUTPUT_PATH}/liblas_test)


More information about the Liblas-commits mailing list