vcpkg/ports/discordcoreapi/portfile.cmake

32 lines
909 B
CMake
Raw Normal View History

if(VCPKG_TARGET_IS_LINUX)
message(WARNING "DiscordCoreAPI only supports g++ 11 on linux.")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO RealTimeChris/DiscordCoreAPI
REF c8591ab721b76a7649cb5b45944fab1c5c798242
SHA512 943d2a77dc3d297b4ec84d6b4808554aec9a89c33a242e5f6401a9831f674ff948f53d3e877737a40517a393b3b2a9bd873c6007a193892743c88c2fdb58341a
HEAD_REF main
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(NO_PREFIX_CORRECTION)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
file(
INSTALL "${SOURCE_PATH}/License.md"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
RENAME copyright
)