I didn’t know about this feature when doing the original CMake files,
we can use this to target header-file includes more precisely.
(Probably more cases exist that can be changed from global to target-
specific includes)
models/propulsion/FGTurbine.cpp
models/propulsion/FGTurboProp.cpp
)
-
-include_directories(${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
+
add_library(JSBSim STATIC ${SOURCES} ${HEADERS})
+
+target_include_directories(JSBSim PRIVATE ${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
LocationWidget.ui)
qt5_add_resources(qrc_sources resources.qrc)
- include_directories(${PROJECT_BINARY_DIR}/src/GUI)
add_library(fglauncher QtLauncher.cxx
QtLauncher.hxx
set_property(TARGET fglauncher PROPERTY AUTOMOC ON)
target_link_libraries(fglauncher Qt5::Core Qt5::Widgets )
+ target_include_directories(fglauncher PRIVATE ${PROJECT_BINARY_DIR}/src/GUI)
endif()