2017-11-12 02:46:05 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO discordapp/discord-rpc
|
2018-03-31 07:38:59 +08:00
|
|
|
REF v3.2.0
|
|
|
|
SHA512 83a32db240f30f4429c145dd400eba5b9985ea779e492ffa2be2ba2664d97e4dec1f4416ad0f3e6fc908c3c9b30aebe4a8e293e0ef3c60e01fc6f16b5f9a7c16
|
2017-11-12 02:46:05 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2018-01-23 23:44:13 +08:00
|
|
|
set(STATIC_CRT OFF)
|
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
|
|
|
set(STATIC_CRT ON)
|
2017-11-12 02:46:05 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-01-23 23:44:13 +08:00
|
|
|
OPTIONS -DUSE_STATIC_CRT=${STATIC_CRT}
|
2017-11-12 02:46:05 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
|
|
|
# Remove bin and debug include
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
else()
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/send-presence.exe
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/bin/send-presence.exe)
|
|
|
|
endif()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
# Copy copright information
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/discord-rpc" RENAME "copyright")
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|