]> git.mxchange.org Git - flightgear.git/commitdiff
Use target_include_directories in some places.
authorJames Turner <zakalawe@mac.com>
Sat, 23 Jan 2016 21:55:11 +0000 (15:55 -0600)
committerJames Turner <zakalawe@mac.com>
Tue, 26 Jan 2016 06:48:30 +0000 (07:48 +0100)
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)

src/FDM/JSBSim/CMakeLists.txt
src/GUI/CMakeLists.txt

index 9f6080f12efa5436a43c69916de13e7ea7877795..573ff819f8af3b281b7280c7f1ba16a4bd50b434 100644 (file)
@@ -192,7 +192,8 @@ set(SOURCES
     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)
index 26516756a1870da6eb302d084a8880b376e87398..ae48f32e0a18145dc60499d7798a04441abeaa80 100644 (file)
@@ -78,7 +78,6 @@ if (HAVE_QT)
                             LocationWidget.ui)
     qt5_add_resources(qrc_sources resources.qrc)
 
-    include_directories(${PROJECT_BINARY_DIR}/src/GUI)
 
     add_library(fglauncher QtLauncher.cxx
                             QtLauncher.hxx
@@ -112,6 +111,7 @@ if (HAVE_QT)
 
     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()