diff --git a/src/GUI/CMakeLists.txt b/src/GUI/CMakeLists.txt index b8eb51e5e..57cfc2d5b 100644 --- a/src/GUI/CMakeLists.txt +++ b/src/GUI/CMakeLists.txt @@ -125,7 +125,6 @@ if (HAVE_QT) set_property(TARGET fglauncher PROPERTY AUTOMOC ON) target_link_libraries(fglauncher Qt5::Core Qt5::Widgets Qt5::Network Qt5::Qml Qt5::Quick Qt5::Svg SimGearCore) target_include_directories(fglauncher PRIVATE ${PROJECT_BINARY_DIR}/src/GUI) - add_dependencies(fglauncher fgfs_qm_files) add_library(fgqmlui QQuickDrawable.cxx QQuickDrawable.hxx @@ -166,7 +165,11 @@ if (HAVE_QT) set_property(TARGET fgqmlui PROPERTY AUTOMOC ON) target_link_libraries(fgqmlui Qt5::Quick Qt5::Widgets Qt5::Network Qt5::Qml SimGearCore) target_include_directories(fgqmlui PRIVATE ${PROJECT_BINARY_DIR}/src/GUI) - add_dependencies(fgqmlui fgfs_qm_files) + + if (TARGET fgfs_qm_files) + add_dependencies(fglauncher fgfs_qm_files) + add_dependencies(fgqmlui fgfs_qm_files) + endif() endif()