vcpkg/ports/libopenmpt/portfile.cmake

29 lines
975 B
CMake
Raw Normal View History

2018-01-28 19:14:06 +08:00
vcpkg_from_github(
2023-10-17 03:12:21 +08:00
OUT_SOURCE_PATH SOURCE_PATH
REPO OpenMPT/openmpt
REF "libopenmpt-${VERSION}"
SHA512 00c6f4984a3cbf28ce83442e4ddee7fdf4ec82468813bc4b79fef7f722cd930c11e01f30ffe3bb70763494846d97a09163d772ad9c7963ed425440ad93ffc77b
2023-10-17 03:12:21 +08:00
HEAD_REF master
2018-01-28 19:14:06 +08:00
)
2023-10-17 03:12:21 +08:00
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
2018-01-28 19:14:06 +08:00
vcpkg_cmake_configure(
2023-10-17 03:12:21 +08:00
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
"-DVERSION=${VERSION}"
2018-01-28 19:14:06 +08:00
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
2018-01-28 19:14:06 +08:00
vcpkg_copy_pdbs()
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()
2023-10-17 03:12:21 +08:00
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")