[Liblas-commits] hg: more c++ dll export work. not quite working yet in the unit...

liblas-commits at liblas.org liblas-commits at liblas.org
Mon Nov 1 16:54:06 EDT 2010


changeset 5283f808adf4 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=5283f808adf4
summary: more c++ dll export work.  not quite working yet in the unit tests, but everywhere else seems ok.

diffstat:

 CMakeLists.txt            |  2 --
 apps/CMakeLists.txt       |  5 +++++
 include/liblas/export.hpp |  4 ++++
 test/unit/CMakeLists.txt  |  4 +++-
 4 files changed, 12 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r 53a2356501c7 -r 5283f808adf4 CMakeLists.txt
--- a/CMakeLists.txt	Mon Nov 01 15:48:51 2010 -0500
+++ b/CMakeLists.txt	Mon Nov 01 15:53:50 2010 -0500
@@ -231,8 +231,6 @@
   set(DEFAULT_DATA_SUBDIR .)
   set(DEFAULT_INCLUDE_SUBDIR include)
 
-  add_definitions("-DLAS_DLL_EXPORT=1")
-
   if (MSVC)
     set(DEFAULT_BIN_SUBDIR bin)
   else()
diff -r 53a2356501c7 -r 5283f808adf4 apps/CMakeLists.txt
--- a/apps/CMakeLists.txt	Mon Nov 01 15:48:51 2010 -0500
+++ b/apps/CMakeLists.txt	Mon Nov 01 15:53:50 2010 -0500
@@ -67,6 +67,11 @@
 ###############################################################################
 # Configure build targets
 
+if(WIN32)
+    add_definitions("-DLAS_DLL_EXPORT=1")
+endif()
+
+
 set(APPS_CPP_DEPENDENCIES
     ${LIBLAS_LIB_NAME}
     ${TIFF_LIBRARY}
diff -r 53a2356501c7 -r 5283f808adf4 include/liblas/export.hpp
--- a/include/liblas/export.hpp	Mon Nov 01 15:48:51 2010 -0500
+++ b/include/liblas/export.hpp	Mon Nov 01 15:53:50 2010 -0500
@@ -58,4 +58,8 @@
 #endif
 #endif
 
+#ifdef _MSC_VER
+#pragma warning(disable:4251 4275)
+#endif // _MSC_VER
+
 #endif // LIBLAS_HPP_INCLUDED
diff -r 53a2356501c7 -r 5283f808adf4 test/unit/CMakeLists.txt
--- a/test/unit/CMakeLists.txt	Mon Nov 01 15:48:51 2010 -0500
+++ b/test/unit/CMakeLists.txt	Mon Nov 01 15:53:50 2010 -0500
@@ -27,7 +27,9 @@
     ${GDAL_INCLUDE_DIR}
     ${GEOTIFF_INCLUDE_DIR})
 
-ADD_EXECUTABLE(${LIBLAS_UNIT_TEST} ${LIBLAS_UNIT_TEST_SRC})
+ADD_EXECUTABLE(${LIBLAS_UNIT_TEST} ${LIBLAS_UNIT_TEST_SRC} )
+
+set_target_properties(${LIBLAS_UNIT_TEST} PROPERTIES COMPILE_DEFINITIONS LAS_DLL_IMPORT)
 
 TARGET_LINK_LIBRARIES(${LIBLAS_UNIT_TEST} 
     ${LIBLAS_LIB_NAME}


More information about the Liblas-commits mailing list