[Liblas-commits] hg: Added basic Oracle support to CMake based
build configuratio...
liblas-commits at liblas.org
liblas-commits at liblas.org
Thu Jan 7 19:30:08 EST 2010
changeset d77a114e0cfd in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=d77a114e0cfd
summary: Added basic Oracle support to CMake based build configuration. Compilation tested on Linux only, linker issues - work in progress.
diffstat:
CMakeLists.txt | 15 ++++++++++++---
apps/CMakeLists.txt | 23 ++++++++++++-----------
src/CMakeLists.txt | 26 +++++++++++++-------------
3 files changed, 37 insertions(+), 27 deletions(-)
diffs (196 lines):
diff -r 9a87edbc56c7 -r d77a114e0cfd CMakeLists.txt
--- a/CMakeLists.txt Fri Jan 08 00:28:50 2010 +0000
+++ b/CMakeLists.txt Fri Jan 08 00:29:59 2010 +0000
@@ -149,8 +149,8 @@
INCLUDE_DIRECTORIES(${GEOTIFF_INCLUDE_DIR})
ADD_DEFINITIONS(-DHAVE_LIBGEOTIFF=1)
ENDIF()
- ENDIF(GEOTIFF_FOUND)
-ENDIF(WITH_GEOTIFF)
+ ENDIF()
+ENDIF()
# GDAL/OGR support - optional, default=OFF
SET(WITH_GDAL FALSE CACHE BOOL "Choose if GDAL support should be built")
@@ -195,7 +195,16 @@
ENDIF()
# Oracle support - optional, default=OFF
-# TODO
+SET(WITH_ORACLE FALSE CACHE BOOL "Choose if Oracle support should be built")
+
+IF(WITH_ORACLE)
+ FIND_PACKAGE(Oracle)
+
+ IF(ORACLE_FOUND)
+ INCLUDE_DIRECTORIES(${ORACLE_INCLUDE_DIR})
+ ADD_DEFINITIONS(-DHAVE_ORACLE=1)
+ ENDIF()
+ENDIF()
###############################################################################
# Installation settings
diff -r 9a87edbc56c7 -r d77a114e0cfd apps/CMakeLists.txt
--- a/apps/CMakeLists.txt Fri Jan 08 00:28:50 2010 +0000
+++ b/apps/CMakeLists.txt Fri Jan 08 00:29:59 2010 +0000
@@ -29,7 +29,7 @@
SET(LASINDEX lasindex)
ENDIF()
-IF(OCI_FOUND)
+IF(ORACLE_FOUND)
SET(LAS2OCI las2oci)
ENDIF()
@@ -56,63 +56,64 @@
SET(APPS_CPP_DEPENDENCIES
${LIBLAS_LIB_NAME}
+ ${ZLIB_LIBRARY}
${GEOTIFF_LIBRARY}
${GDAL_LIBRARY}
${SPATIALINDEX_LIBRARY}
- ${ZLIB_LIBRARY})
+ ${ORACLE_LIBRARY})
# Build lasinfo
IF(LASINFO)
SET(LASINFO_SRC lascommon.c ${LASINFO}.c)
ADD_EXECUTABLE(${LASINFO} ${LASINFO_SRC})
TARGET_LINK_LIBRARIES(${LASINFO} ${LIBLAS_C_LIB_NAME})
-ENDIF(LASINFO)
+ENDIF()
# Build las2las
IF(LAS2LAS)
SET(LAS2LAS_SRC lascommon.c ${LAS2LAS}.c)
ADD_EXECUTABLE(${LAS2LAS} ${LAS2LAS_SRC})
TARGET_LINK_LIBRARIES(${LAS2LAS} ${LIBLAS_C_LIB_NAME})
-ENDIF(LAS2LAS)
+ENDIF()
# Build las2txt
IF(LAS2TXT)
SET(LAS2TXT_SRC lascommon.c ${LAS2TXT}.c)
ADD_EXECUTABLE(${LAS2TXT} ${LAS2TXT_SRC})
TARGET_LINK_LIBRARIES(${LAS2TXT} ${LIBLAS_C_LIB_NAME})
-ENDIF(LAS2TXT)
+ENDIF()
# Build txt2las
IF(TXT2LAS)
SET(TXT2LAS_SRC lascommon.c ${TXT2LAS}.c)
ADD_EXECUTABLE(${TXT2LAS} ${TXT2LAS_SRC})
TARGET_LINK_LIBRARIES(${TXT2LAS} ${LIBLAS_C_LIB_NAME})
-ENDIF(TXT2LAS)
+ENDIF()
# Build lasmerge
IF(LASMERGE)
SET(LASMERGE_SRC lascommon.c ${LASMERGE}.c)
ADD_EXECUTABLE(${LASMERGE} ${LASMERGE_SRC})
TARGET_LINK_LIBRARIES(${LASMERGE} ${LIBLAS_C_LIB_NAME})
-ENDIF(LASMERGE)
+ENDIF()
# Build lasindex
IF(LASINDEX)
ADD_EXECUTABLE(${LASINDEX} lasindex.cpp)
TARGET_LINK_LIBRARIES(${LASINDEX} ${APPS_CPP_DEPENDENCIES})
-ENDIF(LASINDEX)
+ENDIF()
# Build las2ogr
IF(LAS2OGR)
ADD_EXECUTABLE(${LAS2OGR} las2ogr.cpp)
TARGET_LINK_LIBRARIES(${LAS2OGR} ${APPS_CPP_DEPENDENCIES})
-ENDIF(LAS2OGR)
+ENDIF()
# Build las2oci
IF(LAS2OCI)
ADD_EXECUTABLE(${LAS2OCI} las2oci.cpp)
- TARGET_LINK_LIBRARIES(${LAS2CI} ${APPS_CPP_DEPENDENCIES})
-ENDIF(LAS2OCI)
+ TARGET_LINK_LIBRARIES(${LAS2OCI} ${APPS_CPP_DEPENDENCIES})
+ENDIF()
###############################################################################
# Targets installation
diff -r 9a87edbc56c7 -r d77a114e0cfd src/CMakeLists.txt
--- a/src/CMakeLists.txt Fri Jan 08 00:28:50 2010 +0000
+++ b/src/CMakeLists.txt Fri Jan 08 00:29:59 2010 +0000
@@ -41,15 +41,15 @@
${LIBLAS_HEADERS_DIR}/guid.hpp
${LIBLAS_HEADERS_DIR}/iterator.hpp
${LIBLAS_HEADERS_DIR}/lasclassification.hpp
- ${LIBLAS_HEADERS_DIR}/lascolor.hpp
+ ${LIBLAS_HEADERS_DIR}/lascolor.hpp
${LIBLAS_HEADERS_DIR}/laserror.hpp
${LIBLAS_HEADERS_DIR}/lasfile.hpp
${LIBLAS_HEADERS_DIR}/lasheader.hpp
${LIBLAS_HEADERS_DIR}/laspoint.hpp
${LIBLAS_HEADERS_DIR}/lasreader.hpp
- ${LIBLAS_HEADERS_DIR}/lasspatialreference.hpp
+ ${LIBLAS_HEADERS_DIR}/lasspatialreference.hpp
${LIBLAS_HEADERS_DIR}/lasvariablerecord.hpp
- ${LIBLAS_HEADERS_DIR}/lasversion.hpp
+ ${LIBLAS_HEADERS_DIR}/lasversion.hpp
${LIBLAS_HEADERS_DIR}/laswriter.hpp
${LIBLAS_HEADERS_DIR}/liblas.hpp)
@@ -60,7 +60,7 @@
${LIBLAS_HEADERS_DIR}/detail/reader.hpp
${LIBLAS_HEADERS_DIR}/detail/reader10.hpp
${LIBLAS_HEADERS_DIR}/detail/reader11.hpp
- ${LIBLAS_HEADERS_DIR}/detail/reader12.hpp
+ ${LIBLAS_HEADERS_DIR}/detail/reader12.hpp
${LIBLAS_HEADERS_DIR}/detail/sha1.hpp
${LIBLAS_HEADERS_DIR}/detail/sharedptr.hpp
${LIBLAS_HEADERS_DIR}/detail/timer.hpp
@@ -68,7 +68,7 @@
${LIBLAS_HEADERS_DIR}/detail/writer.hpp
${LIBLAS_HEADERS_DIR}/detail/writer10.hpp
${LIBLAS_HEADERS_DIR}/detail/writer11.hpp
- ${LIBLAS_HEADERS_DIR}/detail/writer12.hpp
+ ${LIBLAS_HEADERS_DIR}/detail/writer12.hpp
)
SET(LIBLAS_CPP
@@ -88,16 +88,16 @@
detail/reader.cpp
detail/reader10.cpp
detail/reader11.cpp
- detail/reader12.cpp
+ detail/reader12.cpp
detail/writer.cpp
detail/writer10.cpp
detail/writer11.cpp
- detail/writer12.cpp)
+ detail/writer12.cpp)
SET(LIBLAS_SOURCES
${LIBLAS_HPP}
${LIBLAS_DETAIL_HPP}
- ${LIBLAS_INDEX_HPP}
+ ${LIBLAS_INDEX_HPP}
${LIBLAS_CPP}
${LIBLAS_DETAIL_CPP}
${LIBLAS_INDEX_CPP}
@@ -133,11 +133,11 @@
ADD_LIBRARY(${LIBLAS_C_LIB_NAME} SHARED ${LIBLAS_C_SOURCES})
TARGET_LINK_LIBRARIES(${LIBLAS_C_LIB_NAME}
- ${LIBLAS_LIB_NAME}
- ${GDAL_LIBRARY}
- ${GEOTIFF_LIBRARY}
- ${SPATIALINDEX_LIBRARY}
- ${ZLIB_LIBRARIES})
+ ${LIBLAS_LIB_NAME}
+ ${ZLIB_LIBRARIES}
+ ${GEOTIFF_LIBRARY}
+ ${GDAL_LIBRARY}
+ ${SPATIALINDEX_LIBRARY})
###############################################################################
# Targets installation
More information about the Liblas-commits
mailing list