GDAL is a public dependency :(

This commit is contained in:
James Turner 2020-08-23 11:27:02 +01:00
parent 2ed15eebfd
commit 3298260f11
2 changed files with 7 additions and 1 deletions

View File

@ -32,6 +32,10 @@ endif(ENABLE_RTI)
# Alternative terrain engine based on pagedLOD
set(ENABLE_GDAL @ENABLE_GDAL@)
if (ENABLE_GDAL)
find_dependency(GDAL)
endif()
set(ENABLE_OPENMP @ENABLE_OPENMP@)
include("${CMAKE_CURRENT_LIST_DIR}/SimGearTargets.cmake")

View File

@ -168,7 +168,9 @@ if(NOT SIMGEAR_HEADLESS)
${JPEG_LIBRARY})
if(ENABLE_GDAL)
target_link_libraries(SimGearScene PRIVATE GDAL::GDAL)
# FIXME: should be RIVATE, but we leak GDAL headers
# in our own headers :(
target_link_libraries(SimGearScene PUBLIC GDAL::GDAL)
endif()
# only actually needed by canvas/KeyboardEvent.cxx