2018-01-28 19:14:06 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO OpenMPT/openmpt
|
2021-10-26 04:35:56 +08:00
|
|
|
REF 7da598b28acdb8ee8ea0ed93bcb57d680424f5cc # libopenmpt-0.5.12
|
|
|
|
SHA512 0f5441518dbbbbae194c724c47238a3cad876d8eb81e6a89fed3801724a6ae023d6d8806f792dc2f44082f3849cd4e1130081db3668f9974170171227f70e879
|
2018-01-28 19:14:06 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2021-10-26 04:35:56 +08:00
|
|
|
file(READ ${CMAKE_CURRENT_LIST_DIR}/vcpkg.json vcpkg_json)
|
|
|
|
string(JSON version GET "${vcpkg_json}" "version")
|
2018-01-28 19:14:06 +08:00
|
|
|
|
2021-10-26 04:35:56 +08:00
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
2018-01-28 19:14:06 +08:00
|
|
|
|
2021-10-26 04:35:56 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
|
|
|
-DVERSION=${version}
|
2018-01-28 19:14:06 +08:00
|
|
|
)
|
2021-10-26 04:35:56 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-01-28 19:14:06 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-10-26 04:35:56 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libopenmpt/libopenmpt_config.h "defined(LIBOPENMPT_USE_DLL)" "0")
|
|
|
|
else()
|
|
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libopenmpt/libopenmpt_config.h "defined(LIBOPENMPT_USE_DLL)" "1")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|