diff --git a/CMakeLists.txt b/CMakeLists.txt index d0fadfe7..62eba9b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -382,7 +382,10 @@ add_subdirectory( "source/App/vvencapp" ) add_subdirectory( "source/App/vvencFFapp" ) add_subdirectory( "test/vvenclibtest" ) add_subdirectory( "test/vvencinterfacetest" ) -add_subdirectory( "test/vvenc_unit_test" ) + +if( NOT BUILD_SHARED_LIBS ) + add_subdirectory( "test/vvenc_unit_test" ) +endif() include( cmake/modules/vvencTests.cmake ) diff --git a/test/vvenc_unit_test/CMakeLists.txt b/test/vvenc_unit_test/CMakeLists.txt index 0df22f51..b3c3e7ce 100644 --- a/test/vvenc_unit_test/CMakeLists.txt +++ b/test/vvenc_unit_test/CMakeLists.txt @@ -1,9 +1,18 @@ +# executable set( EXE_NAME vvenc_unit_test ) +# get source files file( GLOB SRC_FILES CONFIGURE_DEPENDS "*.cpp" ) +# get include files file( GLOB INC_FILES CONFIGURE_DEPENDS "*.h" ) -add_executable( ${EXE_NAME} ${SRC_FILES} ${INC_FILES} ) +# set resource file for MSVC compilers +if( MSVC ) + set( RESOURCE_FILE ${EXE_NAME}.rc ) +endif() + +# add executable +add_executable( ${EXE_NAME} ${SRC_FILES} ${INC_FILES} ${RESOURCE_FILE} ) set_target_properties( ${EXE_NAME} PROPERTIES RELEASE_POSTFIX "${CMAKE_RELEASE_POSTFIX}" ) set_target_properties( ${EXE_NAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}" ) set_target_properties( ${EXE_NAME} PROPERTIES RELWITHDEBINFO_POSTFIX "${CMAKE_RELWITHDEBINFO_POSTFIX}" ) @@ -19,9 +28,10 @@ target_compile_options( ${EXE_NAME} PRIVATE $<$,$