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")
-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
elseif(H264_LIBS STREQUAL "WIN")
target_sources(rfb PRIVATE H264WinDecoderContext.cxx)
endif()
+ target_link_libraries(rfb ${H264_LIBRARIES})
endif()
if(UNIX)
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)
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)