aboutsummaryrefslogtreecommitdiffstats
path: root/win
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 /win
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 'win')
-rw-r--r--win/vncconfig/CMakeLists.txt3
-rw-r--r--win/winvnc/CMakeLists.txt4
-rw-r--r--win/wm_hooks/CMakeLists.txt5
3 files changed, 6 insertions, 6 deletions
diff --git a/win/vncconfig/CMakeLists.txt b/win/vncconfig/CMakeLists.txt
index 6b620e53..157ee4c5 100644
--- a/win/vncconfig/CMakeLists.txt
+++ b/win/vncconfig/CMakeLists.txt
@@ -1,11 +1,10 @@
-include_directories(${CMAKE_BINARY_DIR}/win)
-
add_executable(vncconfig WIN32
Legacy.cxx
PasswordDialog.cxx
vncconfig.cxx
vncconfig.rc)
+target_include_directories(vncconfig PUBLIC ${CMAKE_BINARY_DIR}/win)
target_link_libraries(vncconfig rfb_win32 rfb network rdr ws2_32.lib)
install(TARGETS vncconfig
diff --git a/win/winvnc/CMakeLists.txt b/win/winvnc/CMakeLists.txt
index 034211c5..e7e1a4de 100644
--- a/win/winvnc/CMakeLists.txt
+++ b/win/winvnc/CMakeLists.txt
@@ -1,5 +1,3 @@
-include_directories(${CMAKE_BINARY_DIR}/win ${CMAKE_CURRENT_SOURCE_DIR})
-
add_executable(winvnc4 WIN32
buildTime.cxx
ControlPanel.cxx
@@ -11,6 +9,8 @@ add_executable(winvnc4 WIN32
winvnc.cxx
winvnc.rc)
+target_include_directories(winvnc4 PUBLIC ${CMAKE_BINARY_DIR}/win)
+target_include_directories(winvnc4 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(winvnc4 rfb rfb_win32 network rdr ws2_32.lib)
install(TARGETS winvnc4
diff --git a/win/wm_hooks/CMakeLists.txt b/win/wm_hooks/CMakeLists.txt
index c8888ab7..441d9bf9 100644
--- a/win/wm_hooks/CMakeLists.txt
+++ b/win/wm_hooks/CMakeLists.txt
@@ -1,5 +1,3 @@
-include_directories(${CMAKE_BINARY_DIR}/win ${CMAKE_CURRENT_SOURCE_DIR})
-
add_library(wm_hooks SHARED
../wm_hooks/wm_hooks.cxx
../wm_hooks/wm_hooks.rc)
@@ -7,6 +5,9 @@ add_library(wm_hooks SHARED
# We want the DLL to be named wm_hooks.dll rather than libwm_hooks.dll
set_target_properties(wm_hooks PROPERTIES PREFIX "")
+target_include_directories(wm_hooks PUBLIC ${CMAKE_BINARY_DIR}/win)
+target_include_directories(wm_hooks PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+
install(TARGETS wm_hooks
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
)