1
0
Fork 0

CMake: the deps are no longer optional. It makes no sense to compile without GDAL

This commit is contained in:
Christian Schmitt 2012-10-07 00:22:40 +02:00
parent e18c939f66
commit 15365a3acd
5 changed files with 10 additions and 26 deletions

View file

@ -71,26 +71,24 @@ find_package(Boost REQUIRED)
find_package(ZLIB REQUIRED)
find_package(Threads 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)
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}")
else(${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION} VERSION_LESS 4.0)
message(STATUS "Found CGAL ${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}")
endif(${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION} VERSION_LESS 4.0)
endif (CGAL_FOUND)
find_package(TIFF) # needed for SRTM
if (CMAKE_CL_64)
find_package(JPEG) # needed for SRTM
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(sys/time.h HAVE_SYS_TIME_H)

View file

@ -1,6 +1,4 @@
if (GDAL_FOUND)
include_directories(${GDAL_INCLUDE_DIR})
endif (GDAL_FOUND)
include( ${CGAL_USE_FILE} )

View file

@ -1,6 +1,3 @@
if (GDAL_FOUND)
include_directories(${GDAL_INCLUDE_DIR})
add_executable(gdalchop gdalchop.cxx)
@ -10,4 +7,3 @@ target_link_libraries(gdalchop
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
)
install(TARGETS gdalchop RUNTIME DESTINATION bin)
endif(GDAL_FOUND)

View file

@ -1,6 +1,3 @@
if (GDAL_FOUND)
include_directories(${GDAL_INCLUDE_DIR})
add_executable(ogr-decode ogr-decode.cxx)
@ -12,4 +9,3 @@ target_link_libraries(ogr-decode
)
install(TARGETS ogr-decode RUNTIME DESTINATION bin)
endif(GDAL_FOUND)

View file

@ -1,6 +1,3 @@
if (GDAL_FOUND)
include_directories(${GDAL_INCLUDE_DIR})
add_executable(poly2ogr poly2ogr.cxx)
@ -16,4 +13,3 @@ target_link_libraries(poly2ogr
)
install(TARGETS poly2ogr RUNTIME DESTINATION bin)
endif(GDAL_FOUND)