CMake: the deps are no longer optional. It makes no sense to compile without GDAL
This commit is contained in:
parent
e18c939f66
commit
15365a3acd
5 changed files with 10 additions and 26 deletions
|
@ -71,26 +71,24 @@ find_package(Boost REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
find_package(SimGear 2.5.0 REQUIRED)
|
find_package(SimGear 2.5.0 REQUIRED)
|
||||||
|
find_package(GDAL REQUIRED)
|
||||||
|
find_package(TIFF REQUIRED) # needed for SRTM
|
||||||
|
find_package(NewMat11 REQUIRED)
|
||||||
|
find_library(POCO_FOUNDATION PocoFoundation REQUIRED)
|
||||||
|
find_library(POCO_NET PocoNet REQUIRED)
|
||||||
|
|
||||||
find_package(CGAL COMPONENTS Core REQUIRED)
|
find_package(CGAL COMPONENTS Core REQUIRED)
|
||||||
if(${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION} VERSION_LESS 4.0)
|
if (CGAL_FOUND)
|
||||||
|
if(${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION} VERSION_LESS 4.0)
|
||||||
message(FATAL_ERROR "CGAL >= 4.0 is required. Found ${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}")
|
message(FATAL_ERROR "CGAL >= 4.0 is required. Found ${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}")
|
||||||
else(${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION} VERSION_LESS 4.0)
|
else(${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION} VERSION_LESS 4.0)
|
||||||
message(STATUS "Found CGAL ${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}")
|
message(STATUS "Found CGAL ${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}")
|
||||||
endif(${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION} VERSION_LESS 4.0)
|
endif(${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION} VERSION_LESS 4.0)
|
||||||
|
endif (CGAL_FOUND)
|
||||||
|
|
||||||
find_package(TIFF) # needed for SRTM
|
|
||||||
if (CMAKE_CL_64)
|
if (CMAKE_CL_64)
|
||||||
find_package(JPEG) # needed for SRTM
|
find_package(JPEG) # needed for SRTM
|
||||||
endif (CMAKE_CL_64)
|
endif (CMAKE_CL_64)
|
||||||
find_package(NewMat11)
|
|
||||||
|
|
||||||
if(ENABLE_GDAL)
|
|
||||||
find_package(GDAL) # build OGRDecode
|
|
||||||
endif(ENABLE_GDAL)
|
|
||||||
|
|
||||||
find_library(POCO_FOUNDATION PocoFoundation REQUIRED)
|
|
||||||
find_library(POCO_NET PocoNet REQUIRED)
|
|
||||||
|
|
||||||
check_include_file(unistd.h HAVE_UNISTD_H)
|
check_include_file(unistd.h HAVE_UNISTD_H)
|
||||||
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
if (GDAL_FOUND)
|
|
||||||
include_directories(${GDAL_INCLUDE_DIR})
|
include_directories(${GDAL_INCLUDE_DIR})
|
||||||
endif (GDAL_FOUND)
|
|
||||||
|
|
||||||
include( ${CGAL_USE_FILE} )
|
include( ${CGAL_USE_FILE} )
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
|
|
||||||
if (GDAL_FOUND)
|
|
||||||
|
|
||||||
include_directories(${GDAL_INCLUDE_DIR})
|
include_directories(${GDAL_INCLUDE_DIR})
|
||||||
add_executable(gdalchop gdalchop.cxx)
|
add_executable(gdalchop gdalchop.cxx)
|
||||||
|
|
||||||
|
@ -10,4 +7,3 @@ target_link_libraries(gdalchop
|
||||||
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
||||||
)
|
)
|
||||||
install(TARGETS gdalchop RUNTIME DESTINATION bin)
|
install(TARGETS gdalchop RUNTIME DESTINATION bin)
|
||||||
endif(GDAL_FOUND)
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
|
|
||||||
if (GDAL_FOUND)
|
|
||||||
|
|
||||||
include_directories(${GDAL_INCLUDE_DIR})
|
include_directories(${GDAL_INCLUDE_DIR})
|
||||||
add_executable(ogr-decode ogr-decode.cxx)
|
add_executable(ogr-decode ogr-decode.cxx)
|
||||||
|
|
||||||
|
@ -12,4 +9,3 @@ target_link_libraries(ogr-decode
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS ogr-decode RUNTIME DESTINATION bin)
|
install(TARGETS ogr-decode RUNTIME DESTINATION bin)
|
||||||
endif(GDAL_FOUND)
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
|
|
||||||
if (GDAL_FOUND)
|
|
||||||
|
|
||||||
include_directories(${GDAL_INCLUDE_DIR})
|
include_directories(${GDAL_INCLUDE_DIR})
|
||||||
add_executable(poly2ogr poly2ogr.cxx)
|
add_executable(poly2ogr poly2ogr.cxx)
|
||||||
|
|
||||||
|
@ -16,4 +13,3 @@ target_link_libraries(poly2ogr
|
||||||
)
|
)
|
||||||
|
|
||||||
install(TARGETS poly2ogr RUNTIME DESTINATION bin)
|
install(TARGETS poly2ogr RUNTIME DESTINATION bin)
|
||||||
endif(GDAL_FOUND)
|
|
||||||
|
|
Loading…
Reference in a new issue