From 99562cfde6f9b412c02bb8dbe99c87c22b377bec Mon Sep 17 00:00:00 2001 From: James Turner <zakalawe@mac.com> Date: Fri, 14 Oct 2011 18:26:59 +0100 Subject: [PATCH] CMake support for GDAL / building OGR decode. --- CMakeLists.txt | 1 + src/Prep/CMakeLists.txt | 1 + src/Prep/OGRDecode/CMakeLists.txt | 12 ++++++++++++ 3 files changed, 14 insertions(+) create mode 100644 src/Prep/OGRDecode/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 621834c4..5552650d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,7 @@ find_package(SimGear 2.5.0 REQUIRED) find_package(GPC REQUIRED) find_package(TIFF) # needed for SRTM find_package(NewMat11) +find_package(GDAL) # needed for OGRDecode check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(sys/time.h HAVE_SYS_TIME_H) diff --git a/src/Prep/CMakeLists.txt b/src/Prep/CMakeLists.txt index dc8aa368..22b9aa12 100644 --- a/src/Prep/CMakeLists.txt +++ b/src/Prep/CMakeLists.txt @@ -12,6 +12,7 @@ add_subdirectory(ShapeFile) add_subdirectory(TGVPF) add_subdirectory(Terra) add_subdirectory(TerraFit) +add_subdirectory(OGRDecode) diff --git a/src/Prep/OGRDecode/CMakeLists.txt b/src/Prep/OGRDecode/CMakeLists.txt new file mode 100644 index 00000000..f08fa29f --- /dev/null +++ b/src/Prep/OGRDecode/CMakeLists.txt @@ -0,0 +1,12 @@ + +if (GDAL_FOUND) +add_executable(ogr-decode ogr-decode.cxx) + +target_link_libraries(ogr-decode + ${GDAL_LIBRARY} + Polygon Geometry poly2tri TriangleJRS + ${SIMGEAR_CORE_LIBRARIES} + ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} + ${GPC_LIBRARY}) + +endif(GDAL_FOUND)