[Liblas-commits] hg: 2 new changesets
liblas-commits at liblas.org
liblas-commits at liblas.org
Mon Oct 19 17:00:47 EDT 2009
changeset 27b8d7c94396 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=27b8d7c94396
summary: Updated .hgignore patterns with Windows/Visual C++ specific files.
changeset 2f33d0723e98 in /home/www/liblas.org/hg
details: http://hg.liblas.org/main/hg?cmd=changeset;node=2f33d0723e98
summary: Added support for OSGEO4W_ROOT to CMake macros.
diffstat:
.hgignore | 11 +++++
build/cmake/FindGDAL.cmake | 28 +++++++++++--
build/cmake/FindGeoTIFF.cmake | 72 +++++++++++++----------------------
build/cmake/FindSpatialIndex.cmake | 16 +++++--
4 files changed, 72 insertions(+), 55 deletions(-)
diffs (236 lines):
diff -r a11bf44844f7 -r 2f33d0723e98 .hgignore
--- a/.hgignore Mon Oct 19 21:02:24 2009 +0100
+++ b/.hgignore Mon Oct 19 22:00:35 2009 +0100
@@ -1,20 +1,29 @@
syntax: glob
.deps
.libs
+*~
*.dll
+*.embed.manifest
*.exe
*.exp
+*.idb
+*.ilk
+*.intermediate.manifest
*.la
*.lib
*.lo
+*.ncb
*.o
*.obj
+*.pdb
*.pyc
*.res
+*.suo
*.swp
*.bz2
*.gz
*.orig
+*.user
aclocal.m4
apps/las2las
apps/las2txt
@@ -51,3 +60,5 @@
CMakeCache.txt
cmake_install.cmake
src/liblas.a
+Debug
+Release
diff -r a11bf44844f7 -r 2f33d0723e98 build/cmake/FindGDAL.cmake
--- a/build/cmake/FindGDAL.cmake Mon Oct 19 21:02:24 2009 +0100
+++ b/build/cmake/FindGDAL.cmake Mon Oct 19 22:00:35 2009 +0100
@@ -14,11 +14,21 @@
#
###############################################################################
MESSAGE(STATUS "Searching for GDAL ${GDAL_FIND_VERSION}+ library")
+MESSAGE(STATUS " NOTE: Required version is not checked - to be implemented")
SET(GDAL_NAMES gdal)
IF(WIN32)
+ SET(OSGEO4W_IMPORT_LIBRARY gdal_i)
+ IF($ENV{OSGEO4W_ROOT})
+ SET(OSGEO4W_ROOT_DIR $ENV{OSGEO4W_ROOT})
+ MESSAGE(STATUS "Trying OSGeo4W using environment variable OSGEO4W_ROOT=$ENV{OSGEO4W_ROOT}")
+ ELSE()
+ SET(OSGEO4W_ROOT_DIR c:/OSGeo4W)
+ MESSAGE(STATUS "Trying OSGeo4W using default location OSGEO4W_ROOT=${OSGEO4W_ROOT_DIR}")
+ ENDIF()
+
IF(MINGW)
FIND_PATH(GDAL_INCLUDE_DIR
gdal.h
@@ -26,7 +36,8 @@
PATHS
/usr/local/include
/usr/include
- c:/msys/local/include)
+ c:/msys/local/include
+ ${OSGEO4W_ROOT_DIR}/include)
FIND_LIBRARY(GDAL_LIBRARY
NAMES ${GDAL_NAMES}
@@ -34,21 +45,28 @@
PATHS
/usr/local/lib
/usr/lib
- c:/msys/local/lib)
+ c:/msys/local/lib
+ ${OSGEO4W_ROOT_DIR}/lib)
ENDIF(MINGW)
IF(MSVC)
- SET(GDAL_INCLUDE_DIR "$ENV{LIB_DIR}/include/gdal" CACHE STRING INTERNAL)
+ FIND_PATH(GDAL_INCLUDE_DIR
+ NAMES gdal.h
+ PATH_PREFIXES gdal gdal-1.6
+ PATHS
+ "$ENV{LIB_DIR}/include/gdal"
+ ${OSGEO4W_ROOT_DIR}/include)
- SET(GDAL_NAMES ${GDAL_NAMES} gdal_I)
+ SET(GDAL_NAMES ${OSGEO4W_IMPORT_LIBRARY} ${GDAL_NAMES})
FIND_LIBRARY(GDAL_LIBRARY
NAMES ${GDAL_NAMES}
PATH_PREFIXES gdal gdal-1.6
PATHS
"$ENV{LIB_DIR}/lib"
/usr/lib
- c:/msys/local/lib)
+ c:/msys/local/lib
+ ${OSGEO4W_ROOT_DIR}/lib)
IF(GDAL_LIBRARY)
SET(GDAL_LIBRARY;odbc32;odbccp32 CACHE STRING INTERNAL)
diff -r a11bf44844f7 -r 2f33d0723e98 build/cmake/FindGeoTIFF.cmake
--- a/build/cmake/FindGeoTIFF.cmake Mon Oct 19 21:02:24 2009 +0100
+++ b/build/cmake/FindGeoTIFF.cmake Mon Oct 19 22:00:35 2009 +0100
@@ -17,61 +17,43 @@
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
###############################################################################
+MESSAGE(STATUS "Searching for GeoTIFF ${GeoTIFF_FIND_VERSION}+ library")
+MESSAGE(STATUS " NOTE: Required version is not checked - to be implemented")
-SET(GEOTIFF_NAMES geotiff)
+IF(GEOTIFF_INCLUDE_DIR)
+ # Already in cache, be silent
+ SET(GEOTIFF_FIND_QUIETLY TRUE)
+ENDIF()
IF(WIN32)
+ SET(OSGEO4W_IMPORT_LIBRARY geotiff_i)
+ IF($ENV{OSGEO4W_ROOT})
+ SET(OSGEO4W_ROOT_DIR $ENV{OSGEO4W_ROOT})
+ MESSAGE(STATUS "Trying OSGeo4W using environment variable OSGEO4W_ROOT=$ENV{OSGEO4W_ROOT}")
+ ELSE()
+ SET(OSGEO4W_ROOT_DIR c:/OSGeo4W)
+ MESSAGE(STATUS "Trying OSGeo4W using default location OSGEO4W_ROOT=${OSGEO4W_ROOT_DIR}")
+ ENDIF()
+ENDIF()
+
+FIND_PATH(GEOTIFF_INCLUDE_DIR
+ geotiff.h
+ PATH_PREFIXES geotiff
+ PATHS
+ ${OSGEO4W_ROOT_DIR}/include)
- IF(MINGW)
- FIND_PATH(GEOTIFF_INCLUDE_DIR
- geotiff.h
- PATH_PREFIXES geotiff
- PATHS
- /usr/local/include
- /usr/include
- c:/msys/local/include)
+SET(GEOTIFF_NAMES ${OSGEO4W_IMPORT_LIBRARY} geotiff)
- FIND_LIBRARY(GEOTIFF_LIBRARY
- NAMES ${GEOTIFF_NAMES}
- PATHS
- /usr/local/lib
- /usr/lib
- c:/msys/local/lib)
- ENDIF(MINGW)
-
- IF(MSVC)
- FIND_PATH(GEOTIFF_INCLUDE_DIR
- geotiff.h
- PATH_PREFIXES geotiff
- PATHS
- "$ENV{LIB_DIR}/include"
- c:/OSGeo4W/include
- c:/msys/local/include)
-
- SET(GEOTIFF_NAMES ${GEOTIFF_NAMES} geotiff_i)
- FIND_LIBRARY(GEOTIFF_LIBRARY NAMES
- NAMES ${GEOTIFF_NAMES}
- PATHS
- "$ENV{LIB_DIR}/lib"
- c:/OSGeo4W/lib
- c:/msys/local/lib)
- ENDIF(MSVC)
-
-ELSEIF(UNIX)
-
- FIND_PATH(GEOTIFF_INCLUDE_DIR geotiff.h PATH_PREFIXES geotiff)
-
- FIND_LIBRARY(GEOTIFF_LIBRARY NAMES ${GEOTIFF_NAMES})
-
-ELSE()
- MESSAGE("FindGeoTIFF.cmake: unrecognized or unsupported operating system")
-ENDIF()
+FIND_LIBRARY(GEOTIFF_LIBRARY
+ NAMES ${GEOTIFF_NAMES}
+ PATHS
+ ${OSGEO4W_ROOT_DIR}/lib)
IF(GEOTIFF_FOUND)
SET(GEOTIFF_LIBRARIES ${GEOTIFF_LIBRARY})
ENDIF()
-# Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE
+# Handle the QUIETLY and REQUIRED arguments and set GEOTIFF_FOUND to TRUE
# if all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOTIFF DEFAULT_MSG GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR)
diff -r a11bf44844f7 -r 2f33d0723e98 build/cmake/FindSpatialIndex.cmake
--- a/build/cmake/FindSpatialIndex.cmake Mon Oct 19 21:02:24 2009 +0100
+++ b/build/cmake/FindSpatialIndex.cmake Mon Oct 19 22:00:35 2009 +0100
@@ -20,22 +20,28 @@
SET(SPATIALINDEX_FIND_QUIETLY TRUE)
ENDIF()
-IF(MSVC)
+IF(WIN32)
SET(OSGEO4W_IMPORT_LIBRARY spatialindex_i)
- SET(DEFAULT_OSGEO4W_HOME_DIR c:/OSGeo4W)
+ IF($ENV{OSGEO4W_ROOT})
+ SET(OSGEO4W_ROOT_DIR $ENV{OSGEO4W_ROOT})
+ MESSAGE(STATUS "Trying OSGeo4W using environment variable OSGEO4W_ROOT=$ENV{OSGEO4W_ROOT}")
+ ELSE()
+ SET(OSGEO4W_ROOT_DIR c:/OSGeo4W)
+ MESSAGE(STATUS "Trying OSGeo4W using default location OSGEO4W_ROOT=${OSGEO4W_ROOT_DIR}")
+ ENDIF()
ENDIF()
FIND_PATH(SPATIALINDEX_INCLUDE_DIR
NAMES RTree.h
PATH_PREFIXES spatialindex
PATHS
- ${DEFAULT_OSGEO4W_HOME_DIR}/include)
+ ${OSGEO4W_ROOT_DIR}/include)
-SET(SPATIALINDEX_NAMES spatialindex ${OSGEO4W_IMPORT_LIBRARY})
+SET(SPATIALINDEX_NAMES ${OSGEO4W_IMPORT_LIBRARY} spatialindex)
FIND_LIBRARY(SPATIALINDEX_LIBRARY
NAMES ${SPATIALINDEX_NAMES}
PATHS
- ${DEFAULT_OSGEO4W_HOME_DIR}/lib)
+ ${OSGEO4W_ROOT_DIR}/lib)
# Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE
# if all listed variables are TRUE
More information about the Liblas-commits
mailing list