CMake: make another object dependency explicit
Since we’re not using target_link_libraries, we need to explicitly define fgfsObjects (which contains main.cxx) as depending on the embedded resources target.
This commit is contained in:
parent
9fc45e598f
commit
026b02d7e9
2 changed files with 7 additions and 1 deletions
|
@ -495,6 +495,8 @@ include(SetupFGFSLibraries)
|
||||||
add_library(fgfsObjects OBJECT flightgear-version)
|
add_library(fgfsObjects OBJECT flightgear-version)
|
||||||
add_dependencies(fgfsObjects buildId)
|
add_dependencies(fgfsObjects buildId)
|
||||||
|
|
||||||
|
# remove once we use CMake 3.12, since then the dependency will be explicit
|
||||||
|
add_dependencies(fgfsObjects fgembeddedresources)
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,11 @@ add_custom_command(
|
||||||
|
|
||||||
add_library(fgembeddedresources STATIC
|
add_library(fgembeddedresources STATIC
|
||||||
${CMAKE_BINARY_DIR}/src/EmbeddedResources/FlightGear-resources.cxx
|
${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 <EmbeddedResources/FlightGear-resources.hxx>
|
||||||
|
target_include_directories(fgembeddedresources INTERFACE ${CMAKE_BINARY_DIR}/src)
|
||||||
|
|
||||||
target_link_libraries(fgembeddedresources SimGearCore)
|
target_link_libraries(fgembeddedresources SimGearCore)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue