[Liblas-commits] hg: add LIBLAS_VERSION_MAJOR and friends instead of depending on...

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Dec 23 15:16:56 EST 2010


details:   http://hg.liblas.orghg/rev/150ea47e65ec
changeset: 2637:150ea47e65ec
user:      Howard Butler <hobu.inc at gmail.com>
date:      Thu Dec 23 14:16:37 2010 -0600
description:
add LIBLAS_VERSION_MAJOR and friends instead of depending on cpack variables of same name
Subject: hg: start fixing up liblas-config script

details:   http://hg.liblas.orghg/rev/124f0b82a28d
changeset: 2638:124f0b82a28d
user:      Howard Butler <hobu.inc at gmail.com>
date:      Thu Dec 23 14:16:49 2010 -0600
description:
start fixing up liblas-config script

diffstat:

 CMakeLists.txt        |  13 ++++++++++---
 HOWTORELEASE.txt      |   6 +++---
 apps/liblas-config.in |  12 ++++++------
 doc/conf.py           |   6 +++---
 4 files changed, 22 insertions(+), 15 deletions(-)

diffs (107 lines):

diff -r 61da0342dae0 -r 124f0b82a28d CMakeLists.txt
--- a/CMakeLists.txt	Thu Dec 23 13:27:55 2010 -0600
+++ b/CMakeLists.txt	Thu Dec 23 14:16:49 2010 -0600
@@ -8,6 +8,11 @@
 # libLAS general settings
 project(libLAS)
 
+
+SET(LIBLAS_VERSION_MAJOR "1")
+SET(LIBLAS_VERSION_MINOR "6")
+SET(LIBLAS_VERSION_PATCH "0b3")
+
 if(WIN32)
   # Name of C++ library
   set(LIBLAS_LIB_NAME liblas)
@@ -303,6 +308,7 @@
   set(DEFAULT_LIB_SUBDIR lib)
   set(DEFAULT_DATA_SUBDIR share/liblas)
   set(DEFAULT_INCLUDE_SUBDIR include)
+  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/apps/liblas-config.in ${CMAKE_CURRENT_BINARY_DIR}/apps/liblas-config)
 endif()
 
 # Locations are changeable by user to customize layout of libLAS installation
@@ -367,10 +373,11 @@
 endif()
 
 
+
 # Version information
-SET(CPACK_PACKAGE_VERSION_MAJOR "1")
-SET(CPACK_PACKAGE_VERSION_MINOR "6")
-SET(CPACK_PACKAGE_VERSION_PATCH "0b3")
+SET(CPACK_PACKAGE_VERSION_MAJOR ${LIBLAS_VERSION_MAJOR})
+SET(CPACK_PACKAGE_VERSION_MINOR ${LIBLAS_VERSION_MINOR})
+SET(CPACK_PACKAGE_VERSION_PATCH ${LIBLAS_VERSION_MINOR})
 SET(OSGEO4W_UPSTREAM_RELEASE "2")
 
 SET(CPACK_SOURCE_GENERATOR "TGZ;ZIP;TBZ2")
diff -r 61da0342dae0 -r 124f0b82a28d HOWTORELEASE.txt
--- a/HOWTORELEASE.txt	Thu Dec 23 13:27:55 2010 -0600
+++ b/HOWTORELEASE.txt	Thu Dec 23 14:16:49 2010 -0600
@@ -25,9 +25,9 @@
  
   - CMakeLists.txt
    
-    * SET(CPACK_PACKAGE_VERSION_MAJOR "1")
-    * SET(CPACK_PACKAGE_VERSION_MINOR "6")
-    * SET(CPACK_PACKAGE_VERSION_PATCH "0b1")
+    * SET(LIBLAS_VERSION_MAJOR "1")
+    * SET(LIBLAS_VERSION_MINOR "6")
+    * SET(LIBLAS_VERSION_PATCH "0b1")
     
   - include/liblas/capi/las_version.h
 
diff -r 61da0342dae0 -r 124f0b82a28d apps/liblas-config.in
--- a/apps/liblas-config.in	Thu Dec 23 13:27:55 2010 -0600
+++ b/apps/liblas-config.in	Thu Dec 23 14:16:49 2010 -0600
@@ -23,27 +23,27 @@
 
 case $1 in 
   --libs)
-    echo @LIBS@
+    echo "${LIBS}"
     ;;
 
   --defines)
-    echo @DEFS@
+    echo 
     ;;
 
   --includes)
-    echo @GEOTIFF_INC@ @GDAL_INC@
+    echo -I${GDAL_INCLUDE_DIR} -I${GEOTIFF_INCLUDE_DIR} -I${LIBXML2_INCLUDE_DIR} -I${ORACLE_INCLUDE_DIR} -I${TIFF_INCLUDE_DIR}
     ;;
 
   --cflags)
-    echo @CFLAGS@
+    echo ${CMAKE_C_FLAGS}
     ;;
 
   --cxxflags)
-    echo @CXXFLAGS@
+    echo ${CMAKE_CXX_FLAGS}
     ;;
     
   --version)
-    echo @RELEASE_VERSION@
+    echo ${LIBLAS_VERSION_MAJOR}.${LIBLAS_VERSION_MINOR}.${LIBLAS_VERSION_PATCH}
     ;;
 
   *)
diff -r 61da0342dae0 -r 124f0b82a28d doc/conf.py
--- a/doc/conf.py	Thu Dec 23 13:27:55 2010 -0600
+++ b/doc/conf.py	Thu Dec 23 14:16:49 2010 -0600
@@ -55,9 +55,9 @@
 def read_version(filename):
     # oh yes, this is brittle
     data = open(filename).readlines()
-    major = 'CPACK_PACKAGE_VERSION_MAJOR'
-    minor = 'CPACK_PACKAGE_VERSION_MINOR'
-    patch = 'CPACK_PACKAGE_VERSION_PATCH'
+    major = 'LIBLAS_VERSION_MAJOR'
+    minor = 'LIBLAS_VERSION_MINOR'
+    patch = 'LIBLAS_VERSION_PATCH'
     
     for line in data:
         if str(major) in line:


More information about the Liblas-commits mailing list