aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/vvenc
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/vvenc')
-rw-r--r--vcpkg/ports/vvenc/fix-cmakelists.patch51
-rw-r--r--vcpkg/ports/vvenc/fix-dependencies.patch77
-rw-r--r--vcpkg/ports/vvenc/no-werror.patch51
-rw-r--r--vcpkg/ports/vvenc/portfile.cmake39
-rw-r--r--vcpkg/ports/vvenc/vcpkg.json25
5 files changed, 243 insertions, 0 deletions
diff --git a/vcpkg/ports/vvenc/fix-cmakelists.patch b/vcpkg/ports/vvenc/fix-cmakelists.patch
new file mode 100644
index 0000000..adcc3d1
--- /dev/null
+++ b/vcpkg/ports/vvenc/fix-cmakelists.patch
@@ -0,0 +1,51 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 551ec4b..ae36bc8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -288,8 +288,11 @@ endif()
+
+
+ add_subdirectory( "source/Lib/vvenc" )
++if(BUILD_TOOLS)
+ add_subdirectory( "source/App/vvencapp" )
+ add_subdirectory( "source/App/vvencFFapp" )
++endif()
++if(BUILD_TESTING)
+ add_subdirectory( "test/vvenclibtest" )
+ add_subdirectory( "test/vvencinterfacetest" )
+
+@@ -378,6 +381,7 @@ add_vvenc_test( compare_output-medium_rc2p_statsFile_easy 30 NO_OUTPUT "${OUT_VV
+
+ add_test( NAME Cleanup_remove_temp_files COMMAND ${CMAKE_COMMAND} -E remove -f ${CLEANUP_TEST_FILES} rec.yuv stats_exp.json stats_easy.json )
+ set_tests_properties( Cleanup_remove_temp_files PROPERTIES FIXTURES_CLEANUP cleanup )
++endif()
+
+ if( VVENC_ENABLE_INSTALL )
+ # include installer
+diff --git a/cmake/modules/vvencInstall.cmake b/cmake/modules/vvencInstall.cmake
+index 4945f1d..7006bf6 100644
+--- a/cmake/modules/vvencInstall.cmake
++++ b/cmake/modules/vvencInstall.cmake
+@@ -16,9 +16,11 @@ macro( install_targets config_ )
+ RUNTIME DESTINATION ${RUNTIME_DEST}
+ LIBRARY DESTINATION ${LIBRARY_DEST}
+ ARCHIVE DESTINATION ${ARCHIVE_DEST} )
++ if(BUILD_TOOLS)
+ install( TARGETS vvencapp vvencFFapp
+ CONFIGURATIONS ${config_}
+ RUNTIME DESTINATION ${RUNTIME_DEST} )
++ endif()
+ endmacro( install_targets )
+
+ # install pdb file for static and shared libraries
+@@ -61,8 +63,10 @@ install_targets( RelWithDebInfo )
+
+ # install pdb files
+ install_lib_pdb( vvenc )
++if(BUILD_TOOLS)
+ install_exe_pdb( vvencapp )
+ install_exe_pdb( vvencFFapp )
++endif()
+
+ # configure version file
+ configure_file( cmake/install/vvencConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/vvencConfigVersion.cmake @ONLY )
diff --git a/vcpkg/ports/vvenc/fix-dependencies.patch b/vcpkg/ports/vvenc/fix-dependencies.patch
new file mode 100644
index 0000000..1dd997a
--- /dev/null
+++ b/vcpkg/ports/vvenc/fix-dependencies.patch
@@ -0,0 +1,77 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 551ec4b..8405ad0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -161,6 +161,8 @@ set_property( GLOBAL PROPERTY USE_FOLDERS ON )
+ # Enable multithreading
+ find_package( Threads REQUIRED )
+
++find_package(nlohmann_json CONFIG REQUIRED)
++
+ # set _WIN32_WINNT
+ if( WIN32 )
+ # set _WIN32_WINT version global
+
+diff --git a/source/App/vvencFFapp/CMakeLists.txt b/source/App/vvencFFapp/CMakeLists.txt
+index 869b6ac..452301c 100644
+--- a/source/App/vvencFFapp/CMakeLists.txt
++++ b/source/App/vvencFFapp/CMakeLists.txt
+@@ -34,7 +34,7 @@ target_compile_options( ${EXE_NAME} PRIVATE $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CX
+ $<$<CXX_COMPILER_ID:MSVC>:/W4 /WX /wd4100 /wd4244 /wd4251 /wd4459 /wd4996>)
+
+ target_include_directories( ${EXE_NAME} PRIVATE ../../Lib )
+-target_link_libraries( ${EXE_NAME} Threads::Threads vvenc )
++target_link_libraries( ${EXE_NAME} Threads::Threads vvenc nlohmann_json::nlohmann_json )
+
+ # example: place header files in different folders
+ source_group( "Header Files" FILES ${INC_FILES} )
+
+diff --git a/source/App/vvencapp/CMakeLists.txt b/source/App/vvencapp/CMakeLists.txt
+index a0e764b..98e5bb4 100644
+--- a/source/App/vvencapp/CMakeLists.txt
++++ b/source/App/vvencapp/CMakeLists.txt
+@@ -31,7 +31,7 @@ target_compile_options( ${EXE_NAME} PRIVATE $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CX
+ $<$<CXX_COMPILER_ID:MSVC>:/W4 /WX /wd4244 /wd4251 /wd4996>)
+
+ target_include_directories( ${EXE_NAME} PRIVATE ../../Lib )
+-target_link_libraries( ${EXE_NAME} Threads::Threads vvenc )
++target_link_libraries( ${EXE_NAME} Threads::Threads vvenc nlohmann_json::nlohmann_json )
+
+ # example: place header files in different folders
+ source_group( "Header Files" FILES ${INC_FILES} )
+diff --git a/source/Lib/apputils/LogoRenderer.h b/source/Lib/apputils/LogoRenderer.h
+index 6f990e6..bbf40d7 100644
+--- a/source/Lib/apputils/LogoRenderer.h
++++ b/source/Lib/apputils/LogoRenderer.h
+@@ -58,7 +58,7 @@ POSSIBILITY OF SUCH DAMAGE.
+ #include "FileIOHelper.h"
+
+ #ifdef VVENC_ENABLE_THIRDPARTY_JSON
+-#include "../../../thirdparty/nlohmann_json/single_include/nlohmann/json.hpp"
++#include "nlohmann/json.hpp"
+ using nlohmann::json;
+ #endif
+
+diff --git a/source/Lib/vvenc/CMakeLists.txt b/source/Lib/vvenc/CMakeLists.txt
+index 5ee3740..827cf41 100644
+--- a/source/Lib/vvenc/CMakeLists.txt
++++ b/source/Lib/vvenc/CMakeLists.txt
+@@ -70,7 +70,8 @@ add_compile_definitions( ${LIB_NAME_UC}_SOURCE )
+ # set PRIVATE include directories for all targets in this directory
+ include_directories( $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../../include> $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}> )
+ include_directories( . .. ../DecoderLib ../EncoderLib ../CommonLib ../CommonLib/x86 ../apputils )
+-include_directories( SYSTEM ../../../thirdparty )
++find_path(SIMDE_INCLUDE_DIRS "simde/arm/neon.h")
++include_directories(SYSTEM ${SIMDE_INCLUDE_DIRS})
+
+ # set common warning flags
+ add_compile_options( "$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall;-Werror;-Wno-deprecated-register;-Wno-unused-const-variable;-Wno-unknown-attributes>" )
+@@ -140,7 +141,7 @@ endif()
+ if( VVENC_ENABLE_THIRDPARTY_JSON )
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVVENC_ENABLE_THIRDPARTY_JSON" )
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVVENC_ENABLE_THIRDPARTY_JSON" )
+- target_include_directories( ${LIB_NAME} PRIVATE ../../../thirdparty/nlohmann_json/single_include )
++ target_link_libraries( ${LIB_NAME} PRIVATE nlohmann_json::nlohmann_json )
+ endif()
+
+ if( TARGET INTEL_ITT)
diff --git a/vcpkg/ports/vvenc/no-werror.patch b/vcpkg/ports/vvenc/no-werror.patch
new file mode 100644
index 0000000..8c2dc26
--- /dev/null
+++ b/vcpkg/ports/vvenc/no-werror.patch
@@ -0,0 +1,51 @@
+diff --git a/source/App/vvencFFapp/CMakeLists.txt b/source/App/vvencFFapp/CMakeLists.txt
+index 452301c..947da3d 100644
+--- a/source/App/vvencFFapp/CMakeLists.txt
++++ b/source/App/vvencFFapp/CMakeLists.txt
+@@ -29,9 +29,9 @@ set_target_properties( ${EXE_NAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DE
+ set_target_properties( ${EXE_NAME} PROPERTIES RELWITHDEBINFO_POSTFIX "${CMAKE_RELWITHDEBINFO_POSTFIX}" )
+ set_target_properties( ${EXE_NAME} PROPERTIES MINSIZEREL_POSTFIX "${CMAKE_MINSIZEREL_POSTFIX}" )
+
+-target_compile_options( ${EXE_NAME} PRIVATE $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall -Werror>
+- $<$<CXX_COMPILER_ID:GNU>:-Wall -Werror -fdiagnostics-show-option>
+- $<$<CXX_COMPILER_ID:MSVC>:/W4 /WX /wd4100 /wd4244 /wd4251 /wd4459 /wd4996>)
++target_compile_options( ${EXE_NAME} PRIVATE $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall>
++ $<$<CXX_COMPILER_ID:GNU>:-Wall -fdiagnostics-show-option>
++ $<$<CXX_COMPILER_ID:MSVC>:/wd4100 /wd4244 /wd4251 /wd4459 /wd4996>)
+
+ target_include_directories( ${EXE_NAME} PRIVATE ../../Lib )
+ target_link_libraries( ${EXE_NAME} Threads::Threads vvenc nlohmann_json::nlohmann_json )
+diff --git a/source/App/vvencapp/CMakeLists.txt b/source/App/vvencapp/CMakeLists.txt
+index 98e5bb4..f5ae8f1 100644
+--- a/source/App/vvencapp/CMakeLists.txt
++++ b/source/App/vvencapp/CMakeLists.txt
+@@ -26,9 +26,9 @@ set_target_properties( ${EXE_NAME} PROPERTIES DEBUG_POSTFIX "${CMAKE_DE
+ set_target_properties( ${EXE_NAME} PROPERTIES RELWITHDEBINFO_POSTFIX "${CMAKE_RELWITHDEBINFO_POSTFIX}" )
+ set_target_properties( ${EXE_NAME} PROPERTIES MINSIZEREL_POSTFIX "${CMAKE_MINSIZEREL_POSTFIX}" )
+
+-target_compile_options( ${EXE_NAME} PRIVATE $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall -Werror>
+- $<$<CXX_COMPILER_ID:GNU>:-Wall -Werror -fdiagnostics-show-option>
+- $<$<CXX_COMPILER_ID:MSVC>:/W4 /WX /wd4244 /wd4251 /wd4996>)
++target_compile_options( ${EXE_NAME} PRIVATE $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall>
++ $<$<CXX_COMPILER_ID:GNU>:-Wall -fdiagnostics-show-option>
++ $<$<CXX_COMPILER_ID:MSVC>:/wd4244 /wd4251 /wd4996>)
+
+ target_include_directories( ${EXE_NAME} PRIVATE ../../Lib )
+ target_link_libraries( ${EXE_NAME} Threads::Threads vvenc nlohmann_json::nlohmann_json )
+diff --git a/source/Lib/vvenc/CMakeLists.txt b/source/Lib/vvenc/CMakeLists.txt
+index 827cf41..93bcfc0 100644
+--- a/source/Lib/vvenc/CMakeLists.txt
++++ b/source/Lib/vvenc/CMakeLists.txt
+@@ -74,9 +74,9 @@ find_path(SIMDE_INCLUDE_DIRS "simde/arm/neon.h")
+ include_directories(SYSTEM ${SIMDE_INCLUDE_DIRS})
+
+ # set common warning flags
+-add_compile_options( "$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall;-Werror;-Wno-deprecated-register;-Wno-unused-const-variable;-Wno-unknown-attributes>" )
+-add_compile_options( "$<$<CXX_COMPILER_ID:GNU>:-Wall;-Werror;-Wno-unused-function;;-Wno-unused-variable;;-Wno-sign-compare;;-fdiagnostics-show-option;-Wno-ignored-attributes>" )
+-add_compile_options( "$<$<CXX_COMPILER_ID:MSVC>:/W4;/WX;/wd4100;/wd4127;/wd4244;/wd4245;/wd4251;/wd4310;/wd4389;/wd4456;/wd4457;/wd4458;/wd4459;/wd4505;/wd4701;/wd4702;/wd4703;/wd4996>" )
++add_compile_options( "$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall;-Wno-deprecated-register;-Wno-unused-const-variable;-Wno-unknown-attributes>" )
++add_compile_options( "$<$<CXX_COMPILER_ID:GNU>:-Wall;-Wno-unused-function;;-Wno-unused-variable;;-Wno-sign-compare;;-fdiagnostics-show-option;-Wno-ignored-attributes>" )
++add_compile_options( "$<$<CXX_COMPILER_ID:MSVC>:/wd4100;/wd4127;/wd4244;/wd4245;/wd4251;/wd4310;/wd4389;/wd4456;/wd4457;/wd4458;/wd4459;/wd4505;/wd4701;/wd4702;/wd4703;/wd4996>" )
+
+ # don't export all symbols from shared libraries by default (gcc: -fvisibility=hidden), only those marked as VVENC_DECL
+ # behavior similar to __declspec(dllexport) on windows
diff --git a/vcpkg/ports/vvenc/portfile.cmake b/vcpkg/ports/vvenc/portfile.cmake
new file mode 100644
index 0000000..750b230
--- /dev/null
+++ b/vcpkg/ports/vvenc/portfile.cmake
@@ -0,0 +1,39 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO fraunhoferhhi/vvenc
+ REF v${VERSION}
+ SHA512 bf2ac5fc3859cb3303ef4fa4fcdbe00a6db617e3c2e76c6d658071a7650e5966fa1522ccb2feca8c770cea3ea25d2b573dbd0c72f4c0d71be61ba7dd1ab9440b
+ HEAD_REF master
+ PATCHES
+ fix-cmakelists.patch
+ fix-dependencies.patch
+ no-werror.patch
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ tools BUILD_TOOLS
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS ${FEATURE_OPTIONS}
+ -DBUILD_TESTING=OFF
+ -DCCACHE_FOUND=OFF
+)
+
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/vvenc)
+
+vcpkg_copy_pdbs()
+vcpkg_fixup_pkgconfig()
+
+if(BUILD_TOOLS)
+ vcpkg_copy_tools(TOOL_NAMES vvencFFapp vvencapp AUTO_CLEAN)
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
diff --git a/vcpkg/ports/vvenc/vcpkg.json b/vcpkg/ports/vvenc/vcpkg.json
new file mode 100644
index 0000000..9ea8a66
--- /dev/null
+++ b/vcpkg/ports/vvenc/vcpkg.json
@@ -0,0 +1,25 @@
+{
+ "name": "vvenc",
+ "version": "1.7.0",
+ "description": "VVenC is a fast and efficient H.266/VVC encoder implementation.",
+ "homepage": "https://github.com/fraunhoferhhi/vvenc",
+ "license": "BSD-3-Clause-Clear",
+ "supports": "!x86 & !arm",
+ "dependencies": [
+ "nlohmann-json",
+ "simde",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "tools": {
+ "description": "Build user tools: vvencFFapp and vvencapp"
+ }
+ }
+}