]> source.dussan.org Git - tigervnc.git/commitdiff
Fix up ffmpeg header and library handling
authorPierre Ossman <ossman@cendio.se>
Mon, 30 May 2022 08:52:23 +0000 (10:52 +0200)
committerPierre Ossman <ossman@cendio.se>
Tue, 7 Jun 2022 08:06:32 +0000 (10:06 +0200)
FFMPEG is needed by the RFB library, so all the details about it should
only be applied there and not for other components.

CMakeLists.txt
common/rfb/CMakeLists.txt
tests/perf/CMakeLists.txt
vncviewer/CMakeLists.txt

index f8cacb9dd79bff6d2c4800f2e77465a50929e790..e5807def71fc6571d1c370f0766e998976a9c1ee 100644 (file)
@@ -189,7 +189,7 @@ if(ENABLE_H264)
       find_library(AVUTIL_LIBRARY avutil)
       find_path(SWSCALE_INCLUDE_DIR libswscale/swscale.h)
       find_library(SWSCALE_LIBRARY swscale)
-      include_directories(${AVCODEC_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR})
+      set(H264_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIRS} ${AVUTIL_INCLUDE_DIRS} ${SWSCALE_INCLUDE_DIRS})
       set(H264_LIBRARIES ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY})
       add_definitions("-D__STDC_CONSTANT_MACROS")
       add_definitions("-DHAVE_H264")
index 1b43ed114a7d73c4ecead297d9a5939d1f43d01c..66014f3e1671e92d8523e08be11b2096f28e2b18 100644 (file)
@@ -1,4 +1,4 @@
-include_directories(${CMAKE_SOURCE_DIR}/common ${JPEG_INCLUDE_DIR} ${PIXMAN_INCLUDE_DIRS})
+include_directories(${CMAKE_SOURCE_DIR}/common ${JPEG_INCLUDE_DIR} ${PIXMAN_INCLUDE_DIRS} ${H264_INCLUDE_DIRS})
 
 add_library(rfb STATIC
   Blacklist.cxx
@@ -75,6 +75,7 @@ if(ENABLE_H264 AND NOT H264_LIBS STREQUAL "NONE")
   elseif(H264_LIBS STREQUAL "WIN")
     target_sources(rfb PRIVATE H264WinDecoderContext.cxx)
   endif()
+  target_link_libraries(rfb ${H264_LIBRARIES})
 endif()
 
 if(UNIX)
index b4cff2080f847ebf8f0332cf8c89e153cef5f717..1b5e9f77829c8650bc5f54e8b657cff9060bee1c 100644 (file)
@@ -3,7 +3,6 @@ include_directories(${GETTEXT_INCLUDE_DIR})
 include_directories(${CMAKE_SOURCE_DIR}/common)
 
 add_library(test_util STATIC util.cxx)
-target_link_libraries(test_util ${H264_LIBRARIES})
 
 add_executable(convperf convperf.cxx)
 target_link_libraries(convperf test_util rfb)
index 51b5f3eaae4bf5369814e5f921ec6a7205015382..15eac66150cdbd351a12e4c443f521eeba7e2e5a 100644 (file)
@@ -50,7 +50,7 @@ else()
   target_sources(vncviewer PRIVATE Surface_X11.cxx)
 endif()
 
-target_link_libraries(vncviewer rfb network rdr os ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES} ${H264_LIBRARIES})
+target_link_libraries(vncviewer rfb network rdr os ${FLTK_LIBRARIES} ${GETTEXT_LIBRARIES})
 
 if(WIN32)
   target_link_libraries(vncviewer msimg32)