vcpkg/ports/libmediainfo/portfile.cmake

35 lines
1.1 KiB
CMake
Raw Normal View History

string(REGEX REPLACE "^([0-9]+)[.]([1-9])\$" "\\1.0\\2" MEDIAINFO_VERSION "${VERSION}")
2020-05-13 07:36:56 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO MediaArea/MediaInfoLib
REF "v${MEDIAINFO_VERSION}"
SHA512 1407f5690415ccb7997cc9bcbe7d90980a52b1d06e543a446a0da8e4cb3f09ba8fcfbf6be80b043d7f76eeb2ba219242da1c34f3225e0f0bfe044b2394c0c3ae
2020-05-13 07:36:56 +08:00
HEAD_REF master
PATCHES
msvc-arm.diff
dependencies.diff
no-windows-namespace.diff
2020-05-13 07:36:56 +08:00
)
vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/Project/CMake"
OPTIONS
-DBUILD_ZENLIB=0
-DBUILD_ZLIB=0
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
-DCMAKE_REQUIRE_FIND_PACKAGE_PkgConfig=1
-DCMAKE_REQUIRE_FIND_PACKAGE_TinyXML=1
2020-05-13 07:36:56 +08:00
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME mediainfolib)
vcpkg_fixup_pkgconfig()
if(NOT VCPKG_BUILD_TYPE AND VCPKG_TARGET_IS_WINDOWS)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libmediainfo.pc" " -lmediainfo" " -lmediainfod")
endif()
2020-05-13 07:36:56 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
2020-05-13 07:36:56 +08:00
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")