]> source.dussan.org Git - tigervnc.git/commitdiff
Move include_directories() to proper places
authorPierre Ossman <ossman@cendio.se>
Wed, 24 Aug 2022 11:35:20 +0000 (13:35 +0200)
committerPierre Ossman <ossman@cendio.se>
Thu, 25 Aug 2022 10:33:56 +0000 (12:33 +0200)
We should scope these as narrowely as possible to avoid side effects.

CMakeLists.txt
common/rdr/CMakeLists.txt
common/rfb/CMakeLists.txt
tests/perf/CMakeLists.txt
tests/unit/CMakeLists.txt

index d88b177fa437a9651c60e8dba6f832823c0d4b53..24336402da76ddb3ce145af134e7f2a787d361a3 100644 (file)
@@ -231,8 +231,6 @@ if(NOT FOUND_LIBJPEG_TURBO)
   message(STATUS "WARNING: You are not using libjpeg-turbo. Performance will suffer.")
 endif()
 
-include_directories(${JPEG_INCLUDE_DIR})
-
 option(BUILD_JAVA "Build Java version of the TigerVNC Viewer" FALSE)
 if(BUILD_JAVA)
   add_subdirectory(java)
@@ -273,9 +271,7 @@ option(ENABLE_GNUTLS "Enable protocol encryption and advanced authentication" ON
 if(ENABLE_GNUTLS)
   find_package(GnuTLS)
   if (GNUTLS_FOUND)
-    include_directories(${GNUTLS_INCLUDE_DIR})
     add_definitions("-DHAVE_GNUTLS")
-    add_definitions(${GNUTLS_DEFINITIONS})
   endif()
 endif()
 
index 46b36cd59079c65acaace65a4ded49b19fc12ef6..08c93d8b933e17dda223d819ef011b9f697a0eae 100644 (file)
@@ -1,4 +1,5 @@
-include_directories(${CMAKE_SOURCE_DIR}/common ${ZLIB_INCLUDE_DIRS})
+include_directories(${CMAKE_SOURCE_DIR}/common)
+include_directories(${ZLIB_INCLUDE_DIRS})
 
 add_library(rdr STATIC
   BufferedInStream.cxx
@@ -19,6 +20,7 @@ add_library(rdr STATIC
 target_link_libraries(rdr ${ZLIB_LIBRARIES} os)
 
 if(GNUTLS_FOUND)
+  include_directories(${GNUTLS_INCLUDE_DIR})
   target_link_libraries(rdr ${GNUTLS_LIBRARIES})
 endif()
 if(WIN32)
index 994f11962992e6aa5eb39b0de6a0a3243c32b749..069664103f2e75da43a18d9d7c13001eba33b2b2 100644 (file)
@@ -1,4 +1,6 @@
-include_directories(${CMAKE_SOURCE_DIR}/common ${JPEG_INCLUDE_DIR} ${PIXMAN_INCLUDE_DIRS} ${H264_INCLUDE_DIRS})
+include_directories(${CMAKE_SOURCE_DIR}/common)
+include_directories(${JPEG_INCLUDE_DIR})
+include_directories(${PIXMAN_INCLUDE_DIRS})
 
 add_library(rfb STATIC
   Blacklist.cxx
@@ -75,6 +77,7 @@ if(ENABLE_H264 AND NOT H264_LIBS STREQUAL "NONE")
   elseif(H264_LIBS STREQUAL "WIN")
     target_sources(rfb PRIVATE H264WinDecoderContext.cxx)
   endif()
+  include_directories(${H264_INCLUDE_DIRS})
   target_link_libraries(rfb ${H264_LIBRARIES})
   target_link_directories(rfb PUBLIC ${H264_LIBRARY_DIRS})
 endif()
@@ -95,6 +98,7 @@ endif()
 
 if(GNUTLS_FOUND)
   target_sources(rfb PRIVATE CSecurityTLS.cxx SSecurityTLS.cxx)
+  include_directories(${GNUTLS_INCLUDE_DIR})
   target_link_libraries(rfb ${GNUTLS_LIBRARIES})
 endif()
 
index 1b5e9f77829c8650bc5f54e8b657cff9060bee1c..70ffe7777f9ee41aac9094c3313308140ed46f89 100644 (file)
@@ -1,6 +1,5 @@
-include_directories(${GETTEXT_INCLUDE_DIR})
-
 include_directories(${CMAKE_SOURCE_DIR}/common)
+include_directories(${GETTEXT_INCLUDE_DIR})
 
 add_library(test_util STATIC util.cxx)
 
index d2c132b5318f6560f72beee2ab28fde5dd80e65c..6daecba503792dc0e1799bc8461b58819b32bcad 100644 (file)
@@ -1,5 +1,6 @@
 include_directories(${CMAKE_SOURCE_DIR}/common)
 include_directories(${CMAKE_SOURCE_DIR}/vncviewer)
+include_directories(${GETTEXT_INCLUDE_DIR})
 
 add_executable(conv conv.cxx)
 target_link_libraries(conv rfb)
@@ -20,4 +21,4 @@ add_executable(unicode unicode.cxx)
 target_link_libraries(unicode rfb)
 
 add_executable(emulatemb emulatemb.cxx ../../vncviewer/EmulateMB.cxx)
-target_link_libraries(emulatemb rfb  ${GETTEXT_LIBRARIES})
\ No newline at end of file
+target_link_libraries(emulatemb rfb  ${GETTEXT_LIBRARIES})