aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-03-30 21:00:12 +0200
committerPierre Ossman <ossman@cendio.se>2023-03-31 11:03:10 +0200
commit640c5503c1b74d518a34bbce0fb7392876e8fb6d (patch)
treef4c2cf9fb20e75914f4ea74d02c63e8c0bc9d4d6 /vncviewer
parent00dc3c0c8d14d2d281e9e273f78abe6d44ed537e (diff)
downloadtigervnc-640c5503c1b74d518a34bbce0fb7392876e8fb6d.tar.gz
tigervnc-640c5503c1b74d518a34bbce0fb7392876e8fb6d.zip
Prefer target_include_directories()
It is more specific, and it properly sets up propagation when include directories also need to be used further down a dependency chain.
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/CMakeLists.txt10
1 files changed, 4 insertions, 6 deletions
diff --git a/vncviewer/CMakeLists.txt b/vncviewer/CMakeLists.txt
index 01b3a89c..c8df6a25 100644
--- a/vncviewer/CMakeLists.txt
+++ b/vncviewer/CMakeLists.txt
@@ -1,8 +1,3 @@
-include_directories(SYSTEM ${FLTK_INCLUDE_DIR})
-include_directories(SYSTEM ${GETTEXT_INCLUDE_DIR})
-
-include_directories(${CMAKE_SOURCE_DIR}/common)
-
add_executable(vncviewer
fltk/Fl_Monitor_Arrangement.cxx
fltk/Fl_Navigation.cxx
@@ -31,7 +26,7 @@ endif()
if(WIN32)
# Since vncviewer.rc is generated, local includes will be looking
# in the wrong directory. We need to help it out.
- include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+ target_include_directories(vncviewer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
configure_file(vncviewer.rc.in vncviewer.rc)
target_sources(vncviewer PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/vncviewer.rc)
endif()
@@ -52,6 +47,9 @@ else()
target_sources(vncviewer PRIVATE Surface_X11.cxx)
endif()
+target_include_directories(vncviewer SYSTEM PUBLIC ${FLTK_INCLUDE_DIR})
+target_include_directories(vncviewer SYSTEM PUBLIC ${GETTEXT_INCLUDE_DIR})
+target_include_directories(vncviewer PUBLIC ${CMAKE_SOURCE_DIR}/common)
target_link_libraries(vncviewer rfb network rdr os ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
if(WIN32)