From e32f9176c571449b4321574ba1b8ffc4a082ef13 Mon Sep 17 00:00:00 2001 From: Longquan Chen Date: Mon, 11 Sep 2017 09:18:46 -0400 Subject: [PATCH] EHN: add library dependency only if the library doesn't exist --- BUILD.md | 2 +- CMakeLists.txt | 4 +-- Source/CMakeLists.txt | 22 +++++++++--- Source/VideoStreaming/VideoStreaming.cmake | 18 +++++----- SuperBuild/External_openHEVC.cmake | 32 ++++++++--------- SuperBuild/External_yasm.cmake | 14 ++++---- SuperBuild/Superbuild.cmake | 40 +++++++++++---------- SuperBuild/findOpenHEVC.cmake | 41 +++++++++++----------- Testing/CMakeLists.txt | 2 +- 9 files changed, 95 insertions(+), 80 deletions(-) diff --git a/BUILD.md b/BUILD.md index 24b48047..ea0f9a2c 100644 --- a/BUILD.md +++ b/BUILD.md @@ -62,7 +62,7 @@ Version 0.8.0 or newer is required, except Version 1.0.0. In the case of H265 build, H265 have many implementations, the encoder used in library is x265 and the decoder is OpenHEVC. OpenIGTLink library doesn't build H265 libraries, so the users need to download and compile the libraries by themselves. -Afterwards, set the variables-"X265_INCLUDE_DIR, X265_LIBRARY_DIR, OPENHEVC_INCLUDE_DIR, OPENHEVC_LIBRARY_DIR"-correctly in cmake configuration. +Afterwards, set the variables-"X265_INCLUDE_DIR, X265_LIBRARY_DIR, OPENHEVC_INCLUDE_DIR, OpenHEVC_LIBRARY_DIR"-correctly in cmake configuration. * Linux / Mac OS X diff --git a/CMakeLists.txt b/CMakeLists.txt index 68e3fd12..997737bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ OPTION(BUILD_VIDEOSTREAM "Build the Video Stream." ON) OPTION(USE_H264 "Link the OpenH264 tree." OFF) OPTION(USE_VP9 "Link the VP9 tree." OFF) OPTION(USE_X265 "Link the X265 tree." OFF) -OPTION(USE_OPENHEVC "Link the OpenHevc tree." OFF) +OPTION(USE_OpenHEVC "Link the OpenHEVC tree." OFF) SET(OpenIGTLink_LINK_H264 "0") SET(OpenIGTLink_LINK_VP9 "0") SET(OpenIGTLink_LINK_X265 "0") @@ -49,7 +49,7 @@ IF(BUILD_VIDEOSTREAM) IF(USE_X265) SET(OpenIGTLink_LINK_X265 "1") ENDIF() - IF(USE_OPENHEVC) + IF(USE_OpenHEVC) SET(OpenIGTLink_LINK_OPENHEVC "1") ENDIF() ENDIF() diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index f09f5b66..60b5382f 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -250,16 +250,28 @@ LIST(APPEND OpenIGTLink_DEPENDENCIES igtlutil) IF (NOT (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.4)) IF(BUILD_VIDEOSTREAM) IF(USE_H264) - add_dependencies(OpenIGTLink OpenH264) + include(${OpenIGTLink_SOURCE_DIR}/SuperBuild/findOpenH264.cmake) + IF(NOT OpenH264_FOUND) + add_dependencies(OpenIGTLink OpenH264) + ENDIF() ENDIF() IF(USE_VP9) - add_dependencies(OpenIGTLink VP9) + include(${OpenIGTLink_SOURCE_DIR}/SuperBuild/findVP9.cmake) + IF(NOT VP9_FOUND) + add_dependencies(OpenIGTLink VP9) + ENDIF() ENDIF() IF(USE_X265) - add_dependencies(OpenIGTLink X265) + include(${OpenIGTLink_SOURCE_DIR}/SuperBuild/findX265.cmake) + IF(NOT X265_FOUND) + add_dependencies(OpenIGTLink X265) + ENDIF() ENDIF() - IF(USE_OPENHEVC) - add_dependencies(OpenIGTLink OpenHEVC) + IF(USE_OpenHEVC) + include(${OpenIGTLink_SOURCE_DIR}/SuperBuild/findOpenHEVC.cmake) + IF(NOT OpenHEVC_FOUND) + add_dependencies(OpenIGTLink OpenHEVC) + ENDIF() ENDIF() ENDIF() IF(BUILD_WEBSOCKET) diff --git a/Source/VideoStreaming/VideoStreaming.cmake b/Source/VideoStreaming/VideoStreaming.cmake index e1a83a10..42004890 100644 --- a/Source/VideoStreaming/VideoStreaming.cmake +++ b/Source/VideoStreaming/VideoStreaming.cmake @@ -91,12 +91,12 @@ IF(${OpenIGTLink_PROTOCOL_VERSION} GREATER "2" AND BUILD_VIDEOSTREAM) ENDIF() ENDIF() - IF(USE_OPENHEVC) + IF(USE_OpenHEVC) INCLUDE(${OpenIGTLink_SOURCE_DIR}/SuperBuild/External_openHEVC.cmake) LIST(APPEND OpenIGTLink_INCLUDE_DIRS - ${OPENHEVC_INCLUDE_DIR} - ${OPENHEVC_INCLUDE_DIR}/gpac/modules/openhevc_dec - ${OPENHEVC_LIBRARY_DIR} + ${OpenHEVC_INCLUDE_DIR} + ${OpenHEVC_INCLUDE_DIR}/gpac/modules/openhevc_dec + ${OpenHEVC_LIBRARY_DIR} ) LIST(APPEND OpenIGTLink_SOURCES ${PROJECT_SOURCE_DIR}/Source/VideoStreaming/H265Decoder.cxx @@ -128,9 +128,9 @@ IF(WIN32) # for Windows ${LINK_X265_LIBRARY} ) ENDIF() - IF((${OpenIGTLink_PROTOCOL_VERSION} GREATER "2" ) AND USE_OPENHEVC) + IF((${OpenIGTLink_PROTOCOL_VERSION} GREATER "2" ) AND USE_OpenHEVC) #To do, library name depends on the compiler setting, could be vpxmt.lib and vpxmtd also. Make sure the setting matches. - SET(LINK_OPENHEVC_LIBRARY optimized ${OPENHEVC_LIBRARY_DIR}\\Release\\LibOpenHevcWrapper.lib debug ${OPENHEVC_LIBRARY_DIR}\\Debug\\LibOpenHevcWrapper.lib) + SET(LINK_OPENHEVC_LIBRARY optimized ${OpenHEVC_LIBRARY_DIR}\\Release\\LibOpenHevcWrapper.lib debug ${OpenHEVC_LIBRARY_DIR}\\Debug\\LibOpenHevcWrapper.lib) LIST(APPEND LINK_LIBS ${LINK_OPENHEVC_LIBRARY} ) @@ -151,10 +151,10 @@ ELSE() # for POSIX-compatible OSs ${X265_LIBRARY_DIR}/libx265.a ) ENDIF() - IF((${OpenIGTLink_PROTOCOL_VERSION} GREATER "2" ) AND USE_OPENHEVC) - SET(LINK_OPENHEVC_LIBRARY ${OPENHEVC_LIBRARY_DIR}/libLibOpenHevcWrapper.a) + IF((${OpenIGTLink_PROTOCOL_VERSION} GREATER "2" ) AND USE_OpenHEVC) + SET(LINK_OPENHEVC_LIBRARY ${OpenHEVC_LIBRARY_DIR}/libLibOpenHevcWrapper.a) IF (CMAKE_CONFIGURATION_TYPES) - SET(LINK_OPENHEVC_LIBRARY optimized ${OPENHEVC_LIBRARY_DIR}/Release/libLibOpenHevcWrapper.a debug ${OPENHEVC_LIBRARY_DIR}/Debug/libLibOpenHevcWrapper.a) + SET(LINK_OPENHEVC_LIBRARY optimized ${OpenHEVC_LIBRARY_DIR}/Release/libLibOpenHevcWrapper.a debug ${OpenHEVC_LIBRARY_DIR}/Debug/libLibOpenHevcWrapper.a) ENDIF() LIST(APPEND LINK_LIBS ${LINK_OPENHEVC_LIBRARY} diff --git a/SuperBuild/External_openHEVC.cmake b/SuperBuild/External_openHEVC.cmake index ec065194..cd64e828 100644 --- a/SuperBuild/External_openHEVC.cmake +++ b/SuperBuild/External_openHEVC.cmake @@ -6,13 +6,13 @@ SET(OpenHEVC_DEPENDENCIES) IF(NOT YASM_FOUND) LIST(APPEND OpenHEVC_DEPENDENCIES YASM) ENDIF() -IF(OPENHEVC_FOUND) - # openHEVC has been built already - MESSAGE(STATUS "Using openHEVC available at: ${OPENHEVC_INCLUDE_DIR}") - #FIND_PACKAGE(openHEVC REQUIRED) - #SET(OPENHEVC_LIBRARY_DIR "${openHEVC_DIR}" CACHE INTERNAL "Path to store openHEVC library") +IF(OpenHEVC_FOUND) + # OpenHEVC has been built already + MESSAGE(STATUS "Using OpenHEVC available at: ${OpenHEVC_INCLUDE_DIR}") + #FIND_PACKAGE(OpenHEVC REQUIRED) + #SET(OpenHEVC_LIBRARY_DIR "${OpenHEVC_DIR}" CACHE INTERNAL "Path to store OpenHEVC library") ELSE() - # openHEVC has not been built yet, so download and build it as an external project + # OpenHEVC has not been built yet, so download and build it as an external project SET(GIT_REPOSITORY "https://github.com/openigtlink/openHEVC.git") SET(GIT_TAG "master") @@ -20,25 +20,25 @@ ELSE() LIST(APPEND PLATFORM_SPECIFIC_ARGS -DCMAKE_CXX_MP_FLAG:BOOL=ON) ENDIF() - MESSAGE(STATUS "Downloading openHEVC ${GIT_TAG} from: ${GIT_REPOSITORY}") + MESSAGE(STATUS "Downloading OpenHEVC ${GIT_TAG} from: ${GIT_REPOSITORY}") - SET (OPENHEVC_INCLUDE_DIR "${CMAKE_BINARY_DIR}/Deps/openHEVC" CACHE PATH "openHEVC source directory" FORCE) - SET (OPENHEVC_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Deps/openHEVC-bin" CACHE PATH "openHEVC library directory" FORCE) + SET (OpenHEVC_INCLUDE_DIR "${CMAKE_BINARY_DIR}/Deps/OpenHEVC" CACHE PATH "OpenHEVC source directory" FORCE) + SET (OpenHEVC_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Deps/OpenHEVC-bin" CACHE PATH "OpenHEVC library directory" FORCE) ExternalProject_Add( OpenHEVC - PREFIX "${CMAKE_BINARY_DIR}/Deps/openHEVC-prefix" - SOURCE_DIR "${OPENHEVC_INCLUDE_DIR}" - BINARY_DIR "${OPENHEVC_LIBRARY_DIR}" + PREFIX "${CMAKE_BINARY_DIR}/Deps/OpenHEVC-prefix" + SOURCE_DIR "${OpenHEVC_INCLUDE_DIR}" + BINARY_DIR "${OpenHEVC_LIBRARY_DIR}" #--Download step-------------- GIT_REPOSITORY "${GIT_REPOSITORY}" GIT_TAG ${GIT_TAG} #--Configure step------------- CMAKE_ARGS ${PLATFORM_SPECIFIC_ARGS} - -DCMAKE_INSTALL_PREFIX:PATH="${CMAKE_BINARY_DIR}/Deps/openHEVC-install" - -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:STRING=${OPENHEVC_LIBRARY_DIR} - -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:STRING=${OPENHEVC_LIBRARY_DIR} - -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${OPENHEVC_LIBRARY_DIR} + -DCMAKE_INSTALL_PREFIX:PATH="${CMAKE_BINARY_DIR}/Deps/OpenHEVC-install" + -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:STRING=${OpenHEVC_LIBRARY_DIR} + -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:STRING=${OpenHEVC_LIBRARY_DIR} + -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${OpenHEVC_LIBRARY_DIR} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS:BOOL=${OpenIGTLink_BUILD_SHARED_LIBS} -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} diff --git a/SuperBuild/External_yasm.cmake b/SuperBuild/External_yasm.cmake index 2c1ade73..20cff141 100644 --- a/SuperBuild/External_yasm.cmake +++ b/SuperBuild/External_yasm.cmake @@ -18,23 +18,25 @@ ELSE() MESSAGE(STATUS "Downloading yasm ${GIT_TAG} from: ${GIT_REPOSITORY}") SET (YASM_SOURCE_DIR "${CMAKE_BINARY_DIR}/Deps/yasm" CACHE PATH "YASM source directory" FORCE) - SET (YASM_BINART_DIR "${CMAKE_BINARY_DIR}/Deps/yasm-bin" CACHE PATH "YASM library directory" FORCE) - + SET (YASM_BINARY_DIR "${CMAKE_BINARY_DIR}/Deps/yasm-bin" CACHE PATH "YASM library directory" FORCE) + IF(TARGET YASM) + return() + ENDIF() ExternalProject_Add( YASM PREFIX "${CMAKE_BINARY_DIR}/Deps/yasm-prefix" SOURCE_DIR "${YASM_SOURCE_DIR}" - BINARY_DIR "${YASM_BINART_DIR}" + BINARY_DIR "${YASM_BINARY_DIR}" #--Download step-------------- GIT_REPOSITORY "${GIT_REPOSITORY}" GIT_TAG ${GIT_TAG} #--Configure step------------- CMAKE_ARGS ${PLATFORM_SPECIFIC_ARGS} - -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:STRING=${YASM_BINART_DIR} - -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:STRING=${YASM_BINART_DIR} + -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:STRING=${YASM_BINARY_DIR} + -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:STRING=${YASM_BINARY_DIR} -DYASM_INSTALL_BIN_DIR:STRING="bin" -DPYTHON_EXECUTABLE:STRING=${PYTHON_EXECUTABLE} - -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${YASM_BINART_DIR} + -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${YASM_BINARY_DIR} -DBUILD_SHARED_LIBS:BOOL=${OpenIGTLink_BUILD_SHARED_LIBS} -DBUILD_TESTING:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF diff --git a/SuperBuild/Superbuild.cmake b/SuperBuild/Superbuild.cmake index 6aad6bf4..f5d1f6f7 100644 --- a/SuperBuild/Superbuild.cmake +++ b/SuperBuild/Superbuild.cmake @@ -4,31 +4,32 @@ SET(OpenIGTLink_DEPENDENCIES) #--------------------------------------------------- # VideoStreaming dependencies IF(BUILD_VIDEOSTREAM) - IF(USE_H264) - set(OpenH264_INCLUDE_DIR "" CACHE PATH "H264 source directory" FORCE) - set(OpenH264_LIBRARY_DIR "" CACHE PATH "H264 library directory" FORCE) + IF(USE_H264) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/External_openh264.cmake) + IF(NOT OpenH264_FOUND) + LIST(APPEND OpenIGTLink_DEPENDENCIES OpenH264) + ENDIF() ENDIF() IF(USE_VP9) - set(VP9_INCLUDE_DIR "" CACHE PATH "VP9 source directory" FORCE) - set(VP9_LIBRARY_DIR "" CACHE PATH "VP9 library directory" FORCE) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/External_VP9.cmake) - LIST(APPEND OpenIGTLink_DEPENDENCIES VP9) + IF(NOT VP9_FOUND) + LIST(APPEND OpenIGTLink_DEPENDENCIES VP9) + ENDIF() ENDIF() IF(USE_X265) - set(X265_INCLUDE_DIR "" CACHE PATH "X265 source directory" FORCE) - set(X265_LIBRARY_DIR "" CACHE PATH "X265 library directory" FORCE) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/External_X265.cmake) - LIST(APPEND OpenIGTLink_DEPENDENCIES X265) + IF(NOT X265_FOUND) + LIST(APPEND OpenIGTLink_DEPENDENCIES X265) + ENDIF() ENDIF() - IF(USE_OPENHEVC) - set(OPENHEVC_INCLUDE_DIR "" CACHE PATH "OpenHEVC source directory" FORCE) - set(OPENHEVC_LIBRARY_DIR "" CACHE PATH "OpenHEVC library directory" FORCE) - INCLUDE(${CMAKE_CURRENT_LIST_DIR}/External_openHEVC.cmake) - LIST(APPEND OpenIGTLink_DEPENDENCIES OpenHEVC) + IF(USE_OpenHEVC) + INCLUDE(${CMAKE_CURRENT_LIST_DIR}/External_openHEVC.cmake) + IF(NOT OpenHEVC_FOUND) + LIST(APPEND OpenIGTLink_DEPENDENCIES OpenHEVC) + ENDIF() ENDIF() IF(BUILD_WEBSOCKET) @@ -42,8 +43,8 @@ ExternalProject_Add( OpenIGTLink-lib SOURCE_DIR "${CMAKE_BINARY_DIR}/OpenIGTLink" BINARY_DIR "${CMAKE_BINARY_DIR}/OpenIGTLink-bin" #--Download step-------------- - GIT_REPOSITORY "https://github.com/leochan2009/OpenIGTLink.git" - GIT_TAG superbuild-findmodules + GIT_REPOSITORY "https://github.com/openigtlink/OpenIGTLink.git" + GIT_TAG master #--Configure step------------- CMAKE_ARGS ${PLATFORM_SPECIFIC_ARGS} @@ -59,7 +60,7 @@ ExternalProject_Add( OpenIGTLink-lib -DUSE_H264:BOOL=${USE_H264} -DUSE_VP9:BOOL=${USE_VP9} -DUSE_X265:BOOL=${USE_X265} - -DUSE_OPENHEVC:BOOL=${USE_OPENHEVC} + -DUSE_OpenHEVC:BOOL=${USE_OpenHEVC} -DBUILD_WEBSOCKET:BOOL=${BUILD_WEBSOCKET} -DBUILD_EXAMPLES:BOOL=${BUILD_EXAMPLES} -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} @@ -68,10 +69,11 @@ ExternalProject_Add( OpenIGTLink-lib -DOpenH264_LIBRARY_DIR:STRING=${OpenH264_LIBRARY_DIR} -DX265_INCLUDE_DIR:STRING=${X265_INCLUDE_DIR} -DX265_LIBRARY_DIR:STRING=${X265_LIBRARY_DIR} - -DOPENHEVC_INCLUDE_DIR:STRING=${OPENHEVC_INCLUDE_DIR} - -DOPENHEVC_LIBRARY_DIR:STRING=${OPENHEVC_LIBRARY_DIR} + -DOpenHEVC_INCLUDE_DIR:STRING=${OpenHEVC_INCLUDE_DIR} + -DOpenHEVC_LIBRARY_DIR:STRING=${OpenHEVC_LIBRARY_DIR} -DVP9_INCLUDE_DIR:STRING=${VP9_INCLUDE_DIR} -DVP9_LIBRARY_DIR:STRING=${VP9_LIBRARY_DIR} + -DYASM_BINARY_DIR:STRING=${YASM_BINARY_DIR} #--Build step----------------- BUILD_ALWAYS 1 #--Install step----------------- diff --git a/SuperBuild/findOpenHEVC.cmake b/SuperBuild/findOpenHEVC.cmake index e3a0afa3..9e1a3d1c 100644 --- a/SuperBuild/findOpenHEVC.cmake +++ b/SuperBuild/findOpenHEVC.cmake @@ -1,22 +1,22 @@ # - The OPENHEVC library # Once done this will define # -# OPENHEVC_ROOT - A list of search hints +# Open - A list of search hints # -# OPENHEVC_FOUND - found OPENHEVC -# OPENHEVC_INCLUDE_DIR - the OPENHEVC include directory -# OPENHEVC_LIBRARY_DIR - OPENHEVC library directory +# OpenHEVC_FOUND - found OpenHEVC +# OpenHEVC_INCLUDE_DIR - the OpenHEVC include directory +# OpenHEVC_LIBRARY_DIR - OpenHEVC library directory -IF((EXISTS ${OPENHEVC_INCLUDE_DIR}) AND (EXISTS ${OPENHEVC_LIBRARY_DIR})) - IF(EXISTS "${OPENHEVC_INCLUDE_DIR}/openHevcWrapper.h") +IF((EXISTS ${OpenHEVC_INCLUDE_DIR}) AND (EXISTS ${OpenHEVC_LIBRARY_DIR})) + IF(EXISTS "${OpenHEVC_INCLUDE_DIR}/openHevcWrapper.h") IF(WIN32) ELSE() IF(${CMAKE_BUILD_TYPE}) - IF(EXISTS "${OPENHEVC_LIBRARY_DIR}/${CMAKE_BUILD_TYPE}/libLibOpenHevcWrapper.a" ) + IF(EXISTS "${OpenHEVC_LIBRARY_DIR}/${CMAKE_BUILD_TYPE}/libLibOpenHevcWrapper.a" ) SET(OpenHEVC_Proj_BUILT "1") ENDIF() ELSE() - IF(EXISTS "${OPENHEVC_LIBRARY_DIR}/libLibOpenHevcWrapper.a" ) + IF(EXISTS "${OpenHEVC_LIBRARY_DIR}/libLibOpenHevcWrapper.a" ) SET(OpenHEVC_Proj_BUILT "1") ENDIF() ENDIF() @@ -24,26 +24,25 @@ IF((EXISTS ${OPENHEVC_INCLUDE_DIR}) AND (EXISTS ${OPENHEVC_LIBRARY_DIR})) ENDIF() ENDIF() -SET( OPENHEVC_PATH_HINTS - ${OPENHEVC_ROOT} - ${OPENHEVC_INCLUDE_DIR} - ${OPENHEVC_LIBRARY_DIR} +SET( OpenHEVC_PATH_HINTS + ${OpenHEVC_ROOT} + ${OpenHEVC_INCLUDE_DIR} + ${OpenHEVC_LIBRARY_DIR} ) -unset(OPENHEVC_INCLUDE_DIR CACHE) -find_path(OPENHEVC_INCLUDE_DIR NAMES openHevcWrapper.h +unset(OpenHEVC_INCLUDE_DIR CACHE) +find_path(OpenHEVC_INCLUDE_DIR NAMES openHevcWrapper.h PATH_SUFFIXES gpac/modules/openhevc_dec - HINTS ${OPENHEVC_PATH_HINTS} + HINTS ${OpenHEVC_PATH_HINTS} ) -unset(OPENHEVC_LIBRARY_DIR CACHE) -find_path(OPENHEVC_LIBRARY_DIR +unset(OpenHEVC_LIBRARY_DIR CACHE) +find_path(OpenHEVC_LIBRARY_DIR NAMES LibOpenHevcWrapper${CMAKE_STATIC_LIBRARY_SUFFIX} libLibOpenHevcWrapper.a PATH_SUFFIXES ${CMAKE_BUILD_TYPE} - HINTS ${OPENHEVC_PATH_HINTS} + HINTS ${OpenHEVC_PATH_HINTS} ) - include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENHEVC REQUIRED_VARS OPENHEVC_LIBRARY_DIR OPENHEVC_INCLUDE_DIR) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenHEVC REQUIRED_VARS OpenHEVC_LIBRARY_DIR OpenHEVC_INCLUDE_DIR) -mark_as_advanced(OPENHEVC_INCLUDE_DIR OPENHEVC_LIBRARY_DIR) +mark_as_advanced(OpenHEVC_INCLUDE_DIR OpenHEVC_LIBRARY_DIR) diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index 9232f4b1..0735dc21 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -202,7 +202,7 @@ IF(${OpenIGTLink_PROTOCOL_VERSION} GREATER "2") ADD_TEST(igtlMessageRTPWrapperTestFormatVersion2 ${OpenIGTLink_EXECUTABLE_PATH}/igtlMessageRTPWrapperTest ${TestStringFormat2}) ENDIF() -IF(${OpenIGTLink_PROTOCOL_VERSION} GREATER "2" AND BUILD_VIDEOSTREAM AND (USE_H264 OR USE_VP9 OR (USE_X265 AND USE_OPENHEVC))) +IF(${OpenIGTLink_PROTOCOL_VERSION} GREATER "2" AND BUILD_VIDEOSTREAM AND (USE_H264 OR USE_VP9 OR (USE_X265 AND USE_OpenHEVC))) ADD_TEST(igtlVideoMessageTestFormatVersion1 ${OpenIGTLink_EXECUTABLE_PATH}/igtlVideoMessageTest ${TestStringFormat1}) ADD_TEST(igtlVideoMessageTestFormatVersion2 ${OpenIGTLink_EXECUTABLE_PATH}/igtlVideoMessageTest ${TestStringFormat2}) ADD_TEST(igtlVideoMetaMessageTestFormatVersion2 ${OpenIGTLink_EXECUTABLE_PATH}/igtlVideoMetaMessageTest ${TestStringFormat2})