diff --git a/CMakeLists.txt b/CMakeLists.txt index 43d533193..c6182fbdd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -495,6 +495,8 @@ include(SetupFGFSLibraries) add_library(fgfsObjects OBJECT flightgear-version) add_dependencies(fgfsObjects buildId) +# remove once we use CMake 3.12, since then the dependency will be explicit +add_dependencies(fgfsObjects fgembeddedresources) ######################################################################## diff --git a/src/EmbeddedResources/CMakeLists.txt b/src/EmbeddedResources/CMakeLists.txt index 41428edb6..140422c7d 100644 --- a/src/EmbeddedResources/CMakeLists.txt +++ b/src/EmbeddedResources/CMakeLists.txt @@ -34,7 +34,11 @@ add_custom_command( add_library(fgembeddedresources STATIC ${CMAKE_BINARY_DIR}/src/EmbeddedResources/FlightGear-resources.cxx - ${CMAKE_BINARY_DIR}/src/EmbeddedResources/FlightGear-resources.hxx) + ${CMAKE_BINARY_DIR}/src/EmbeddedResources/FlightGear-resources.hxx + ) + +# users of the library include this as +target_include_directories(fgembeddedresources INTERFACE ${CMAKE_BINARY_DIR}/src) target_link_libraries(fgembeddedresources SimGearCore)