[Liblas-commits] laszip: start adding LASZIP_DLL exports definition in preparatio...

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Dec 30 10:11:01 EST 2010


details:   http://hg.liblas.orglaszip/rev/724ec4f2a7de
changeset: 97:724ec4f2a7de
user:      Howard Butler <hobu.inc at gmail.com>
date:      Thu Dec 30 09:10:52 2010 -0600
description:
start adding LASZIP_DLL exports definition in preparation for shared library build/install/usage

diffstat:

 include/laszip/export.hpp      |  23 +++++++++++++++
 include/laszip/lasunzipper.hpp |   2 +-
 include/laszip/laszip.hpp      |  63 +++++++++++++++++++++--------------------
 include/laszip/laszipper.hpp   |   2 +-
 src/CMakeLists.txt             |   1 +
 5 files changed, 58 insertions(+), 33 deletions(-)

diffs (158 lines):

diff -r 35628e849688 -r 724ec4f2a7de include/laszip/export.hpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/laszip/export.hpp	Thu Dec 30 09:10:52 2010 -0600
@@ -0,0 +1,23 @@
+/* DLL export definitions for LASzip */
+
+#ifndef LASZIPEXPORT_H
+#define LASZIPEXPORT_H
+
+#ifndef LASZIP_DLL
+#if (defined(_MSC_VER) || defined __CYGWIN__) && !defined(LAS_DISABLE_DLL)
+#if defined(LASZIP_DLL_EXPORT)
+#   define LASZIP_DLL   __declspec(dllexport)
+#elif defined(LASZIP_DLL_IMPORT)
+#   define LASZIP_DLL   __declspec(dllimport)
+#endif
+#else
+#  if defined(USE_GCC_VISIBILITY_FLAG)
+#    define LASZIP_DLL     __attribute__ ((visibility("default")))
+#  else
+#    define LASZIP_DLL
+#  endif
+#endif
+#endif
+
+
+#endif
\ No newline at end of file
diff -r 35628e849688 -r 724ec4f2a7de include/laszip/lasunzipper.hpp
--- a/include/laszip/lasunzipper.hpp	Thu Dec 30 09:03:28 2010 -0600
+++ b/include/laszip/lasunzipper.hpp	Thu Dec 30 09:10:52 2010 -0600
@@ -61,7 +61,7 @@
 class ByteStreamIn;
 class LASreadPoint;
 
-class LASunzipper
+class LASZIP_DLL LASunzipper
 {
 public:
   unsigned int open(FILE* file, unsigned int num_items, const LASitem items[], LASzip::CompressionType compression_type);
diff -r 35628e849688 -r 724ec4f2a7de include/laszip/laszip.hpp
--- a/include/laszip/laszip.hpp	Thu Dec 30 09:03:28 2010 -0600
+++ b/include/laszip/laszip.hpp	Thu Dec 30 09:10:52 2010 -0600
@@ -16,36 +16,36 @@
  *
  ****************************************************************************/
 
-/*
-===============================================================================
-
-  FILE:  laszip.hpp
-  
-  CONTENTS:
-  
+/*
+===============================================================================
+
+  FILE:  laszip.hpp
+  
+  CONTENTS:
+  
     Contains LASitem and LASchunk structs as well as the IDs of the currently
-    supported entropy coding scheme
-
-  PROGRAMMERS:
-  
-    martin isenburg at cs.unc.edu
-  
-  COPYRIGHT:
-  
-    copyright (C) 2007  martin isenburg at cs.unc.edu
-    
-    This software is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-  
-  CHANGE HISTORY:
-  
+    supported entropy coding scheme
+
+  PROGRAMMERS:
+  
+    martin isenburg at cs.unc.edu
+  
+  COPYRIGHT:
+  
+    copyright (C) 2007  martin isenburg at cs.unc.edu
+    
+    This software is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+  
+  CHANGE HISTORY:
+  
     12 December 2010 -- refactored from lasdefinitions after movies with silke
-  
-===============================================================================
-*/
-#ifndef LASZIP_H
-#define LASZIP_H
+  
+===============================================================================
+*/
+#ifndef LASZIP_H
+#define LASZIP_H
 
 #if defined(_MSC_VER) && (_MSC_VER < 1300)
 #define LZ_WIN32_VC6
@@ -58,9 +58,10 @@
 #define LASZIP_VERSION_MINOR    0
 #define LASZIP_VERSION_REVISION 0
 
+#include "export.hpp"
 
 
-class LASitem
+class LASZIP_DLL LASitem
 {
 public:
   enum Type { BYTE = 0, SHORT, INT, LONG, FLOAT, DOUBLE, POINT10, GPSTIME11, RGB12, WAVEPACKET13 } type;
@@ -79,7 +80,7 @@
   unsigned short version;
 };
 
-class LASzip
+class LASZIP_DLL LASzip
 {
 public:
     enum CompressionType
@@ -115,4 +116,4 @@
 }; 
 */
 
-#endif
+#endif
diff -r 35628e849688 -r 724ec4f2a7de include/laszip/laszipper.hpp
--- a/include/laszip/laszipper.hpp	Thu Dec 30 09:03:28 2010 -0600
+++ b/include/laszip/laszipper.hpp	Thu Dec 30 09:10:52 2010 -0600
@@ -61,7 +61,7 @@
 class ByteStreamOut;
 class LASwritePoint;
 
-class LASzipper
+class LASZIP_DLL LASzipper
 {
 public:
   unsigned int open(FILE* outfile, unsigned int num_items, LASitem items[], LASzip::CompressionType compression_type);
diff -r 35628e849688 -r 724ec4f2a7de src/CMakeLists.txt
--- a/src/CMakeLists.txt	Thu Dec 30 09:03:28 2010 -0600
+++ b/src/CMakeLists.txt	Thu Dec 30 09:10:52 2010 -0600
@@ -9,6 +9,7 @@
 set(LASZIP_HEADERS_DIR ../include/laszip)
 
 set(LASZIP_HPP
+  ${LASZIP_HEADERS_DIR}/export.hpp
   ${LASZIP_HEADERS_DIR}/laszip.hpp
   ${LASZIP_HEADERS_DIR}/laszipper.hpp
   ${LASZIP_HEADERS_DIR}/lasunzipper.hpp


More information about the Liblas-commits mailing list