[Liblas-commits] hg-main-tree: only wipe LASzip-related objects
when we PDAL_HAVE...
liblas-commits at liblas.org
liblas-commits at liblas.org
Thu Jun 9 16:04:11 EDT 2011
details: http://hg.libpc.orghg-main-tree/rev/16f721744516
changeset: 778:16f721744516
user: Howard Butler <hobu.inc at gmail.com>
date: Thu Jun 09 14:18:12 2011 -0500
description:
only wipe LASzip-related objects when we PDAL_HAVE_LASZIP
Subject: hg-main-tree: clean up CMakeLists a quite a bit
details: http://hg.libpc.orghg-main-tree/rev/9afa9e95aeea
changeset: 779:9afa9e95aeea
user: Howard Butler <hobu.inc at gmail.com>
date: Thu Jun 09 15:04:05 2011 -0500
description:
clean up CMakeLists a quite a bit
diffstat:
src/CMakeLists.txt | 339 ++++++++++++++++++------------------------
src/drivers/las/Iterator.cpp | 2 +
2 files changed, 151 insertions(+), 190 deletions(-)
diffs (truncated from 484 to 300 lines):
diff -r ff4f5f0158f2 -r 9afa9e95aeea src/CMakeLists.txt
--- a/src/CMakeLists.txt Thu Jun 09 11:54:34 2011 -0500
+++ b/src/CMakeLists.txt Thu Jun 09 15:04:05 2011 -0500
@@ -6,15 +6,6 @@
#
###############################################################################
-# Collect dependencies configuration
-if(GDAL_FOUND)
- set(PDAL_GDAL_CPP
- gt_citation.cpp
- gt_wkt_srs.cpp
- tifvsi.cpp)
-endif()
-
-
###############################################################################
# Source files specification
#
@@ -24,7 +15,7 @@
# PDAL_<dirname>_CPP - all the .cpp files for the given subdir/namespace
# ...
-set(PDAL_HEADERS_DIR ../include/pdal)
+set(PDAL_HEADERS_DIR ${PROJECT_SOURCE_DIR}/include/pdal)
set(PDAL_HPP "")
set(PDAL_CPP "")
@@ -85,261 +76,241 @@
${PDAL_XML_SRC}
)
-
-FOREACH(file ${PDAL_BASE_HPP})
- SET(PDAL_HPP "${PDAL_HPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
-
-FOREACH(file ${PDAL_BASE_CPP})
- SET(PDAL_CPP "${PDAL_CPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
+list (APPEND PDAL_CPP ${PDAL_BASE_CPP} )
+list (APPEND PDAL_HPP ${PDAL_BASE_HPP} )
#
# drivers/faux
#
-set(PDAL_DRIVERS_FAUX_HPP
- ${PDAL_HEADERS_DIR}/drivers/faux/Iterator.hpp
- ${PDAL_HEADERS_DIR}/drivers/faux/Reader.hpp
- ${PDAL_HEADERS_DIR}/drivers/faux/Writer.hpp
+set(PDAL_FAUX_PATH drivers/faux)
+set(PDAL_FAUX_HEADERS ${PDAL_HEADERS_DIR}/${PDAL_FAUX_PATH})
+set(PDAL_FAUX_SRC ${PROJECT_SOURCE_DIR}/src/${PDAL_FAUX_PATH})
+set(PDAL_DRIVERS_FAUX_HPP
+ ${PDAL_FAUX_HEADERS}/Iterator.hpp
+ ${PDAL_FAUX_HEADERS}/Reader.hpp
+ ${PDAL_FAUX_HEADERS}/Writer.hpp
)
set (PDAL_DRIVERS_FAUX_CPP
- ./drivers/faux/Iterator.cpp
- ./drivers/faux/Reader.cpp
- ./drivers/faux/Writer.cpp
+ ${PDAL_FAUX_SRC}/Iterator.cpp
+ ${PDAL_FAUX_SRC}/Reader.cpp
+ ${PDAL_FAUX_SRC}/Writer.cpp
)
+list (APPEND PDAL_CPP ${PDAL_DRIVERS_FAUX_CPP} )
+list (APPEND PDAL_HPP ${PDAL_DRIVERS_FAUX_HPP} )
-FOREACH(file ${PDAL_DRIVERS_FAUX_HPP})
- SET(PDAL_HPP "${PDAL_HPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
-
-FOREACH(file ${PDAL_DRIVERS_FAUX_CPP})
- SET(PDAL_CPP "${PDAL_CPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
#
# drivers/las
#
-
-set (PDAL_DRIVERS_LAS_INCLUDE_DIR ${PDAL_HEADERS_DIR}/drivers/las)
-set (PDAL_DRIVERS_LAS_SRC_DIR ./drivers/las)
-
+set(PDAL_LAS_PATH drivers/las)
+set(PDAL_LAS_HEADERS ${PDAL_HEADERS_DIR}/${PDAL_LAS_PATH})
+set(PDAL_LAS_SRC ${PROJECT_SOURCE_DIR}/src/${PDAL_LAS_PATH})
set (PDAL_DRIVERS_LAS_HPP
- ${PDAL_DRIVERS_LAS_SRC_DIR}/GeotiffSupport.hpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}/LasHeaderReader.hpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}/LasHeaderWriter.hpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}/ZipPoint.hpp
- ${PDAL_DRIVERS_LAS_INCLUDE_DIR}/Header.hpp
- ${PDAL_DRIVERS_LAS_INCLUDE_DIR}/Iterator.hpp
- ${PDAL_DRIVERS_LAS_INCLUDE_DIR}/Reader.hpp
- ${PDAL_DRIVERS_LAS_INCLUDE_DIR}/ReaderBase.hpp
- ${PDAL_DRIVERS_LAS_INCLUDE_DIR}/SummaryData.hpp
- ${PDAL_DRIVERS_LAS_INCLUDE_DIR}/Support.hpp
- ${PDAL_DRIVERS_LAS_INCLUDE_DIR}/Writer.hpp
- ${PDAL_DRIVERS_LAS_INCLUDE_DIR}/VariableLengthRecord.hpp
+ ${PDAL_LAS_SRC}/GeotiffSupport.hpp
+ ${PDAL_LAS_SRC}/LasHeaderReader.hpp
+ ${PDAL_LAS_SRC}/LasHeaderWriter.hpp
+ ${PDAL_LAS_SRC}/ZipPoint.hpp
+ ${PDAL_LAS_HEADERS}/Header.hpp
+ ${PDAL_LAS_HEADERS}/Iterator.hpp
+ ${PDAL_LAS_HEADERS}/Reader.hpp
+ ${PDAL_LAS_HEADERS}/ReaderBase.hpp
+ ${PDAL_LAS_HEADERS}/SummaryData.hpp
+ ${PDAL_LAS_HEADERS}/Support.hpp
+ ${PDAL_LAS_HEADERS}/Writer.hpp
+ ${PDAL_LAS_HEADERS}/VariableLengthRecord.hpp
)
-if (GEOTIFF_FOUND)
- if (PDAL_HAVE_GDAL)
- set (PDAL_DRIVERS_LAS_GTIFF ${PDAL_DRIVERS_LAS_SRC_DIR}/GeotiffSupport.cpp)
- endif()
+if ((GEOTIFF_FOUND) AND (GDAL_FOUND))
+ set (PDAL_DRIVERS_LAS_GTIFF ${PDAL_LAS_SRC}/GeotiffSupport.cpp)
endif()
if (LASZIP_FOUND)
- set(PDAL_DRIVERS_LAS_LASZIP ${PDAL_DRIVERS_LAS_SRC_DIR}/ZipPoint.cpp)
+ set(PDAL_DRIVERS_LAS_LASZIP ${PDAL_LAS_SRC}/ZipPoint.cpp)
endif()
+
set (PDAL_DRIVERS_LAS_CPP
${PDAL_DRIVERS_LAS_GTIFF}
- ${PDAL_DRIVERS_LAS_SRC_DIR}/Header.cpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}//Iterator.cpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}/LasHeaderReader.cpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}/LasHeaderWriter.cpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}/Reader.cpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}/SummaryData.cpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}/Support.cpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}/VariableLengthRecord.cpp
- ${PDAL_DRIVERS_LAS_SRC_DIR}/Writer.cpp
${PDAL_DRIVERS_LAS_LASZIP}
+ ${PDAL_LAS_SRC}/Header.cpp
+ ${PDAL_LAS_SRC}/Iterator.cpp
+ ${PDAL_LAS_SRC}/LasHeaderReader.cpp
+ ${PDAL_LAS_SRC}/LasHeaderWriter.cpp
+ ${PDAL_LAS_SRC}/Reader.cpp
+ ${PDAL_LAS_SRC}/SummaryData.cpp
+ ${PDAL_LAS_SRC}/Support.cpp
+ ${PDAL_LAS_SRC}/VariableLengthRecord.cpp
+ ${PDAL_LAS_SRC}/Writer.cpp
)
-
-FOREACH(file ${PDAL_DRIVERS_LAS_HPP})
- SET(PDAL_HPP "${PDAL_HPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
-
-FOREACH(file ${PDAL_DRIVERS_LAS_CPP})
- SET(PDAL_CPP "${PDAL_CPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
+list (APPEND PDAL_CPP ${PDAL_DRIVERS_LAS_CPP} )
+list (APPEND PDAL_HPP ${PDAL_DRIVERS_LAS_HPP} )
#
# drivers/liblas
#
+set(PDAL_LIBLAS_PATH drivers/liblas)
+set(PDAL_LIBLAS_HEADERS ${PDAL_HEADERS_DIR}/${PDAL_LIBLAS_PATH})
+set(PDAL_LIBLAS_SRC ${PROJECT_SOURCE_DIR}/src/${PDAL_LIBLAS_PATH})
+
set (PDAL_DRIVERS_LIBLAS_HPP
- ${PDAL_HEADERS_DIR}/drivers/liblas/Iterator.hpp
- ${PDAL_HEADERS_DIR}/drivers/liblas/Reader.hpp
- ${PDAL_HEADERS_DIR}/drivers/liblas/Writer.hpp
+ ${PDAL_LIBLAS_HEADERS}/Iterator.hpp
+ ${PDAL_LIBLAS_HEADERS}/Reader.hpp
+ ${PDAL_LIBLAS_HEADERS}/Writer.hpp
)
set (PDAL_DRIVERS_LIBLAS_CPP
- ./drivers/liblas/Iterator.cpp
- ./drivers/liblas/Reader.cpp
- ./drivers/liblas/Writer.cpp
+ ${PDAL_LIBLAS_SRC}/Iterator.cpp
+ ${PDAL_LIBLAS_SRC}/Reader.cpp
+ ${PDAL_LIBLAS_SRC}/Writer.cpp
)
-FOREACH(file ${PDAL_DRIVERS_LIBLAS_HPP})
- SET(PDAL_HPP "${PDAL_HPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
-
-FOREACH(file ${PDAL_DRIVERS_LIBLAS_CPP})
- SET(PDAL_CPP "${PDAL_CPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
+list (APPEND PDAL_CPP ${PDAL_DRIVERS_LIBLAS_CPP} )
+list (APPEND PDAL_HPP ${PDAL_DRIVERS_LIBLAS_HPP} )
#
# drivers/oci
#
-if (WITH_ORACLE)
+
+set(PDAL_ORACLE_PATH drivers/oci)
+set(PDAL_ORACLE_HEADERS ${PDAL_HEADERS_DIR}/${PDAL_ORACLE_PATH})
+set(PDAL_ORACLE_SRC ${PROJECT_SOURCE_DIR}/src/${PDAL_ORACLE_PATH})
+
set(PDAL_DRIVERS_OCI_HPP
- ${PDAL_HEADERS_DIR}/drivers/oci/Writer.hpp
- ${PDAL_HEADERS_DIR}/drivers/oci/Reader.hpp
- ${PDAL_HEADERS_DIR}/drivers/oci/Iterator.hpp
- ${PDAL_HEADERS_DIR}/drivers/oci/oci_wrapper.h
- ${PDAL_HEADERS_DIR}/drivers/oci/Common.hpp
+ ${PDAL_ORACLE_HEADERS}/Writer.hpp
+ ${PDAL_ORACLE_HEADERS}/Reader.hpp
+ ${PDAL_ORACLE_HEADERS}/Iterator.hpp
+ ${PDAL_ORACLE_HEADERS}/oci_wrapper.h
+ ${PDAL_ORACLE_HEADERS}/Common.hpp
)
set (PDAL_DRIVERS_OCI_CPP
- ./drivers/oci/oci_wrapper.cpp
- ./drivers/oci/common.cpp
- ./drivers/oci/Reader.cpp
- ./drivers/oci/Iterator.cpp
- ./drivers/oci/Writer.cpp
+ ${PDAL_ORACLE_SRC}/oci_wrapper.cpp
+ ${PDAL_ORACLE_SRC}/common.cpp
+ ${PDAL_ORACLE_SRC}/Reader.cpp
+ ${PDAL_ORACLE_SRC}/Iterator.cpp
+ ${PDAL_ORACLE_SRC}/Writer.cpp
)
-FOREACH(file ${PDAL_DRIVERS_OCI_HPP})
- SET(PDAL_HPP "${PDAL_HPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
-
-FOREACH(file ${PDAL_DRIVERS_OCI_CPP})
- SET(PDAL_CPP "${PDAL_CPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
+if (ORACLE_FOUND)
+ list (APPEND PDAL_CPP ${PDAL_DRIVERS_OCI_CPP} )
+ list (APPEND PDAL_HPP ${PDAL_DRIVERS_OCI_HPP} )
endif()
#
# drivers/mrsid
#
-if (MRSID_FOUND)
+set(PDAL_MRSID_PATH drivers/mrsid)
+set(PDAL_MRSID_HEADERS ${PDAL_HEADERS_DIR}/${PDAL_MRSID_PATH})
+set(PDAL_MRSID_SRC ${PROJECT_SOURCE_DIR}/src/${PDAL_MRSID_PATH})
+
set(PDAL_DRIVERS_MRSID_HPP
- ${PDAL_HEADERS_DIR}/drivers/mrsid/Reader.hpp
+ ${PDAL_MRSID_HEADERS}/Reader.hpp
)
set (PDAL_DRIVERS_MRSID_CPP
- ./drivers/mrsid/Reader.cpp
+ ${PDAL_MRSID_SRC}/Reader.cpp
)
-
-FOREACH(file ${PDAL_DRIVERS_MRSID_HPP})
- SET(PDAL_HPP "${PDAL_HPP};${file}" CACHE INTERNAL "source files for drivers/mrsid")
-ENDFOREACH(file)
-FOREACH(file ${PDAL_DRIVERS_MRSID_CPP})
- SET(PDAL_CPP "${PDAL_CPP};${file}" CACHE INTERNAL "source files for drivers/mrsid")
-ENDFOREACH(file)
+if (MRSID_FOUND)
+ list (APPEND PDAL_CPP ${PDAL_DRIVERS_MRSID_CPP} )
+ list (APPEND PDAL_HPP ${PDAL_DRIVERS_MRSID_HPP} )
endif()
#
# drivers/qfit
#
+set(PDAL_QFIT_PATH drivers/qfit)
+set(PDAL_QFIT_HEADERS ${PDAL_HEADERS_DIR}/${PDAL_QFIT_PATH})
+set(PDAL_QFIT_SRC ${PROJECT_SOURCE_DIR}/src/${PDAL_QFIT_PATH})
+
set(PDAL_DRIVERS_QFIT_HPP
- ${PDAL_HEADERS_DIR}/drivers/qfit/Iterator.hpp
- ${PDAL_HEADERS_DIR}/drivers/qfit/Reader.hpp
+ ${PDAL_QFIT_HEADERS}/Iterator.hpp
+ ${PDAL_QFIT_HEADERS}/Reader.hpp
)
set (PDAL_DRIVERS_QFIT_CPP
- ./drivers/qfit/Iterator.cpp
- ./drivers/qfit/Reader.cpp
+ ${PDAL_QFIT_SRC}/Iterator.cpp
+ ${PDAL_QFIT_SRC}/Reader.cpp
)
-
-FOREACH(file ${PDAL_DRIVERS_QFIT_HPP})
- SET(PDAL_HPP "${PDAL_HPP};${file}" CACHE INTERNAL "source files for foo")
-ENDFOREACH(file)
More information about the Liblas-commits
mailing list