[Liblas-commits] hg: LAS_DLL exports for C++ DLL

liblas-commits at liblas.org liblas-commits at liblas.org
Mon Nov 1 14:23:02 EDT 2010


changeset 0af4ad86e374 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=0af4ad86e374
summary: LAS_DLL exports for C++ DLL

diffstat:

 CMakeLists.txt                         |   2 ++
 apps/CMakeLists.txt                    |  15 ++++++++-------
 include/liblas/capi/las_config.h       |   2 ++
 include/liblas/capi/liblas.h           |   1 +
 include/liblas/export.hpp              |   4 ++--
 include/liblas/guid.hpp                |   3 ++-
 include/liblas/iterator.hpp            |   5 +++--
 include/liblas/lasbounds.hpp           |   6 +++---
 include/liblas/lasclassification.hpp   |   3 ++-
 include/liblas/lascolor.hpp            |   4 +++-
 include/liblas/lasdimension.hpp        |   3 ++-
 include/liblas/laserror.hpp            |   3 ++-
 include/liblas/lasfilter.hpp           |  17 +++++++++--------
 include/liblas/lasheader.hpp           |   8 +++++---
 include/liblas/lasindex.hpp            |  11 ++++++-----
 include/liblas/laspoint.hpp            |   5 +++--
 include/liblas/lasreader.hpp           |   3 ++-
 include/liblas/lasschema.hpp           |   5 +++--
 include/liblas/lasspatialreference.hpp |   3 ++-
 include/liblas/lastransform.hpp        |   5 +++--
 include/liblas/lasvariablerecord.hpp   |   5 +++--
 include/liblas/laswriter.hpp           |   3 ++-
 include/liblas/liblas.hpp              |   1 +
 include/liblas/utility.hpp             |   5 +++--
 src/CMakeLists.txt                     |  15 +++++++++++++--
 src/lasheader.cpp                      |   2 +-
 26 files changed, 88 insertions(+), 51 deletions(-)

diffs (truncated from 708 to 300 lines):

diff -r 3fc1129f7404 -r 0af4ad86e374 CMakeLists.txt
--- a/CMakeLists.txt	Mon Nov 01 11:29:56 2010 -0500
+++ b/CMakeLists.txt	Mon Nov 01 13:22:46 2010 -0500
@@ -231,6 +231,8 @@
   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 3fc1129f7404 -r 0af4ad86e374 apps/CMakeLists.txt
--- a/apps/CMakeLists.txt	Mon Nov 01 11:29:56 2010 -0500
+++ b/apps/CMakeLists.txt	Mon Nov 01 13:22:46 2010 -0500
@@ -72,7 +72,8 @@
     ${TIFF_LIBRARY}
     ${GEOTIFF_LIBRARY}
     ${GDAL_LIBRARY}
-    ${SPATIALINDEX_LIBRARY})
+    ${SPATIALINDEX_LIBRARY}
+    ${Boost_LIBRARIES})
 
 link_directories(${Boost_LIBRARY_DIRS})
 
@@ -92,12 +93,12 @@
 
 if(LAS2LAS)
     add_executable(${LAS2LAS} las2las.cpp laskernel.cpp)
-    target_link_libraries(${LAS2LAS} ${APPS_CPP_DEPENDENCIES} ${Boost_LIBRARIES})
+    target_link_libraries(${LAS2LAS} ${APPS_CPP_DEPENDENCIES} )
 endif()
 
 if(LASINFO)
     add_executable(${LASINFO} lasinfo.cpp laskernel.cpp)
-    target_link_libraries(${LASINFO} ${APPS_CPP_DEPENDENCIES} ${Boost_LIBRARIES})
+    target_link_libraries(${LASINFO} ${APPS_CPP_DEPENDENCIES} )
 endif()
 
 # Build las2txt
@@ -130,7 +131,7 @@
 if(LASBLOCK)
     set(LASBLOCK_SRC lasblock.cpp chipper.cpp chipper.hpp)
     add_executable(${LASBLOCK} ${LASBLOCK_SRC})
-    target_link_libraries(${LASBLOCK} ${APPS_CPP_DEPENDENCIES} ${Boost_LIBRARIES})
+    target_link_libraries(${LASBLOCK} ${APPS_CPP_DEPENDENCIES} )
 endif()
 
 # Build las2ogr
@@ -142,7 +143,7 @@
 # Build las2oci
 if(LAS2OCI)
     add_executable(${LAS2OCI} las2oci.cpp oci_wrapper.cpp kdx_util.cpp oci_util.cpp laskernel.cpp chipper.cpp)
-    target_link_libraries(${LAS2OCI} ${APPS_CPP_DEPENDENCIES} ${Boost_LIBRARIES} ${ORACLE_LIBRARY})
+    target_link_libraries(${LAS2OCI} ${APPS_CPP_DEPENDENCIES} ${ORACLE_LIBRARY})
 endif()
 
 if(BIGFILE_TEST)
@@ -152,12 +153,12 @@
 
 if (LASINDEX_TEST)
     add_executable(${LASINDEX_TEST} lasindex_test.cpp)
-    target_link_libraries(${LASINDEX_TEST} ${APPS_CPP_DEPENDENCIES} ${Boost_LIBRARIES})    
+    target_link_libraries(${LASINDEX_TEST} ${APPS_CPP_DEPENDENCIES})    
 endif()
 
 if(BIGFILE_BIO_TEST)
     add_executable(${BIGFILE_BIO_TEST} bigfile_boost_iostreams_test.cpp)
-    target_link_libraries(${BIGFILE_BIO_TEST} ${APPS_CPP_DEPENDENCIES} ${Boost_LIBRARIES})    
+    target_link_libraries(${BIGFILE_BIO_TEST} ${APPS_CPP_DEPENDENCIES} )    
 endif()
 
 ###############################################################################
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/capi/las_config.h
--- a/include/liblas/capi/las_config.h	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/capi/las_config.h	Mon Nov 01 13:22:46 2010 -0500
@@ -55,7 +55,9 @@
 #  define LAS_C_END
 #endif
 
+LAS_C_START
 #include <liblas/export.hpp>
+LAS_C_END
 
 #ifndef NULL
 #define NULL 0
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/capi/liblas.h
--- a/include/liblas/capi/liblas.h	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/capi/liblas.h	Mon Nov 01 13:22:46 2010 -0500
@@ -46,6 +46,7 @@
 
 #include "las_version.h"
 #include "las_config.h"
+#include <liblas/export.hpp>
 
 typedef struct LASWriterHS *LASWriterH;
 typedef struct LASReaderHS *LASReaderH;
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/export.hpp
--- a/include/liblas/export.hpp	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/export.hpp	Mon Nov 01 13:22:46 2010 -0500
@@ -44,9 +44,9 @@
 
 #ifndef LAS_DLL
 #if defined(_MSC_VER) && !defined(LAS_DISABLE_DLL)
-#if defined(LIBLAS_DLL_EXPORT)
+#if defined(LAS_DLL_EXPORT)
 #   define LAS_DLL   __declspec(dllexport)
-#elif defined(LIBLAS_DLL_IMPORT)
+#elif defined(LAS_DLL_IMPORT)
 #   define LAS_DLL   __declspec(dllimport)
 #endif
 #else
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/guid.hpp
--- a/include/liblas/guid.hpp	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/guid.hpp	Mon Nov 01 13:22:46 2010 -0500
@@ -61,6 +61,7 @@
 
 #include <liblas/detail/sha1.hpp>
 #include <liblas/detail/private_utility.hpp>
+#include <liblas/export.hpp>
 // boost
 #include <boost/array.hpp>
 #include <boost/cstdint.hpp>
@@ -111,7 +112,7 @@
 /// uniquely identify every LAS, globally.
 ///
 /// \see About GUID in Wikipedia http://en.wikipedia.org/wiki/Globally_Unique_Identifier 
-class guid
+class LAS_DLL guid
 {
 public:
 
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/iterator.hpp
--- a/include/liblas/iterator.hpp	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/iterator.hpp	Mon Nov 01 13:22:46 2010 -0500
@@ -45,6 +45,7 @@
 #include <liblas/lasreader.hpp>
 #include <liblas/laswriter.hpp>
 #include <liblas/lasindex.hpp>
+#include <liblas/export.hpp>
 #include <iterator>
 #include <cassert>
 
@@ -56,7 +57,7 @@
 /// \sa About Input Iterator at http://www.sgi.com/tech/stl/InputIterator.html
 ///
 template <typename T>
-class reader_iterator
+class LAS_DLL reader_iterator
 {
 public:
 
@@ -157,7 +158,7 @@
 /// \sa About Output Iterator at http://www.sgi.com/tech/stl/OutputIterator.html
 ///
 template <typename T>
-class writer_iterator
+class LAS_DLL writer_iterator
 {
 public:
 
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/lasbounds.hpp
--- a/include/liblas/lasbounds.hpp	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/lasbounds.hpp	Mon Nov 01 13:22:46 2010 -0500
@@ -46,7 +46,7 @@
 #include <liblas/laspoint.hpp>
 #include <liblas/lastransform.hpp>
 #include <liblas/detail/private_utility.hpp>
-
+#include <liblas/export.hpp>
 // boost
 #include <boost/cstdint.hpp>
 
@@ -62,7 +62,7 @@
 namespace liblas {
 
 template <typename T>
-class Range
+class LAS_DLL Range
 {
 public:
     T min;
@@ -166,7 +166,7 @@
 };
     
 template <typename T>
-class Bounds
+class LAS_DLL Bounds
 {
 public:
 
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/lasclassification.hpp
--- a/include/liblas/lasclassification.hpp	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/lasclassification.hpp	Mon Nov 01 13:22:46 2010 -0500
@@ -44,6 +44,7 @@
 
 // boost
 #include <boost/cstdint.hpp>
+#include <liblas/export.hpp>
 // std
 #include <cassert>
 #include <cstddef>
@@ -56,7 +57,7 @@
 
 /// Class definition to manipulate properties of point record classification.
 ///
-class Classification
+class LAS_DLL Classification
 {
 public:
 
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/lascolor.hpp
--- a/include/liblas/lascolor.hpp	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/lascolor.hpp	Mon Nov 01 13:22:46 2010 -0500
@@ -41,6 +41,8 @@
 #ifndef LIBLAS_LASCOLOR_HPP_INCLUDED
 #define LIBLAS_LASCOLOR_HPP_INCLUDED
 
+#include <liblas/export.hpp>
+
 // boost
 #include <boost/array.hpp>
 #include <boost/cstdint.hpp>
@@ -50,7 +52,7 @@
 namespace liblas {
 
 /// RGB color container
-class Color
+class LAS_DLL Color
 {
 public:
 
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/lasdimension.hpp
--- a/include/liblas/lasdimension.hpp	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/lasdimension.hpp	Mon Nov 01 13:22:46 2010 -0500
@@ -46,6 +46,7 @@
 #include <liblas/external/property_tree/ptree.hpp>
 #include <liblas/lasvariablerecord.hpp>
 #include <liblas/lasversion.hpp>
+#include <liblas/export.hpp>
 // boost
 #include <boost/cstdint.hpp>
 #include <boost/any.hpp>
@@ -70,7 +71,7 @@
 namespace liblas {  
 
 /// Dimension definition
-class Dimension
+class LAS_DLL Dimension
 {
 public:
     Dimension(std::string const& name, std::size_t size_in_bits);
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/laserror.hpp
--- a/include/liblas/laserror.hpp	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/laserror.hpp	Mon Nov 01 13:22:46 2010 -0500
@@ -44,6 +44,7 @@
 #ifndef LIBLAS_LASERROR_HPP_INCLUDED
 #define LIBLAS_LASERROR_HPP_INCLUDED
 
+#include <liblas/export.hpp>
 //std
 #include <iosfwd>
 #include <string>
@@ -54,7 +55,7 @@
 /// This class describes details of error condition occured in
 /// libLAS core. All errors are stacked by C API layer, so it's
 /// possible to track problem down to its source.
-class Error
+class LAS_DLL Error
 {
 public:
 
diff -r 3fc1129f7404 -r 0af4ad86e374 include/liblas/lasfilter.hpp
--- a/include/liblas/lasfilter.hpp	Mon Nov 01 11:29:56 2010 -0500
+++ b/include/liblas/lasfilter.hpp	Mon Nov 01 13:22:46 2010 -0500
@@ -46,6 +46,7 @@
 #include <liblas/lasheader.hpp>
 #include <liblas/laspoint.hpp>
 #include <liblas/detail/fwd.hpp>
+#include <liblas/export.hpp>
 // boost
 #include <boost/cstdint.hpp>
 #include <boost/function.hpp>
@@ -59,7 +60,7 @@
 namespace liblas {
 
 /// Defines public interface to LAS filter implementation.
-class FilterI
+class LAS_DLL FilterI
 {
 public:
     
@@ -100,7 +101,7 @@
 
 /// A filter for keeping or rejecting points that fall within a 
 /// specified bounds.
-class BoundsFilter: public FilterI
+class LAS_DLL BoundsFilter: public FilterI
 {
 public:


More information about the Liblas-commits mailing list