mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 03:57:50 +08:00
8454a8de61
Fixes #37089 The port uses the register storage class specifier which was removed in C++17, pinning the standard to C++11 solves this. - [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [x] SHA512s are updated for each updated download. - [x] The "supports" clause reflects platforms that may be fixed by this new version. - [x] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file. - [x] Any patches that are no longer applied are deleted from the port's directory. - [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [x] Only one version is added to each modified port's versions file.
40 lines
1.2 KiB
CMake
40 lines
1.2 KiB
CMake
set(MODPLUG_HASH 5a39f5913d07ba3e61d8d5afdba00b70165da81d)
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
set(STATIC_PATCH "001-automagically-define-modplug-static.patch")
|
|
endif()
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Konstanty/libmodplug
|
|
REF ${MODPLUG_HASH}
|
|
SHA512 c43bb3190b62c3a4e3636bba121b5593bbf8e6577ca9f2aa04d90b03730ea7fb590e640cdadeb565758b92e81187bc456e693fe37f1f4deace9b9f37556e3ba1
|
|
PATCHES
|
|
${STATIC_PATCH}
|
|
002-detect_sinf.patch
|
|
003-use-static-cast-for-ctype.patch
|
|
004-export-pkgconfig.patch # https://github.com/Konstanty/libmodplug/pull/59
|
|
005-fix-install-paths.patch # https://github.com/Konstanty/libmodplug/pull/61
|
|
)
|
|
|
|
set(EXTRA_OPTIONS)
|
|
|
|
if(VCPKG_TARGET_IS_EMSCRIPTEN)
|
|
list(APPEND EXTRA_OPTIONS "-DCMAKE_CXX_STANDARD=11")
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS ${EXTRA_OPTIONS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|