2022-05-18 02:15:06 +08:00
|
|
|
vcpkg_from_github(
|
2017-06-21 06:37:31 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Bromeon/Thor
|
|
|
|
REF v2.0
|
|
|
|
SHA512 634fa5286405d9a8a837c082ace98bbb02e609521418935855b9e2fcad57003dbe35088bd771cf6a9292e55d3787f7e463d7a4cca0d0f007509de2520d9a8cf9
|
|
|
|
HEAD_REF master
|
2021-05-14 04:16:46 +08:00
|
|
|
PATCHES fix-dependency-sfml.patch
|
2017-06-21 06:37:31 +08:00
|
|
|
)
|
2022-05-18 02:15:06 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake/Modules/FindSFML.cmake")
|
2017-06-21 06:37:31 +08:00
|
|
|
|
2022-05-18 02:15:06 +08:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/extlibs")
|
|
|
|
file(COPY "${CURRENT_INSTALLED_DIR}/include/Aurora" DESTINATION "${SOURCE_PATH}/extlibs/aurora/include")
|
2018-08-08 18:30:31 +08:00
|
|
|
file(WRITE "${SOURCE_PATH}/extlibs/aurora/License.txt")
|
2017-06-22 00:29:50 +08:00
|
|
|
|
2018-08-08 18:30:31 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" THOR_STATIC_STD_LIBS)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" THOR_SHARED_LIBS)
|
2017-06-21 06:37:31 +08:00
|
|
|
|
2022-05-18 02:15:06 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-06-21 06:37:31 +08:00
|
|
|
OPTIONS
|
2018-08-08 18:30:31 +08:00
|
|
|
-DTHOR_SHARED_LIBS=${THOR_SHARED_LIBS}
|
|
|
|
-DTHOR_STATIC_STD_LIBS=${THOR_STATIC_STD_LIBS}
|
2017-06-21 06:37:31 +08:00
|
|
|
)
|
|
|
|
|
2022-05-18 02:15:06 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-06-21 06:37:31 +08:00
|
|
|
|
2021-05-14 04:16:46 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2017-06-22 00:04:57 +08:00
|
|
|
|
2021-05-14 04:16:46 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp"
|
|
|
|
"defined(SFML_STATIC)" "1"
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/Thor/Config.hpp"
|
|
|
|
"defined(SFML_STATIC)" "0"
|
|
|
|
)
|
|
|
|
endif()
|
2017-06-22 00:04:57 +08:00
|
|
|
|
|
|
|
file(GLOB LICENSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/LicenseThor.txt"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/LicenseAurora.txt"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/LicenseThor.txt"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/LicenseAurora.txt"
|
2017-06-21 06:37:31 +08:00
|
|
|
)
|
2017-06-22 00:04:57 +08:00
|
|
|
|
|
|
|
if(LICENSE)
|
|
|
|
file(REMOVE ${LICENSE})
|
2017-06-21 06:37:31 +08:00
|
|
|
endif()
|
|
|
|
|
2022-05-18 02:15:06 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/include/Aurora")
|
2017-06-21 06:37:31 +08:00
|
|
|
|
2021-05-14 04:16:46 +08:00
|
|
|
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
2022-05-18 02:15:06 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2021-05-14 04:16:46 +08:00
|
|
|
endif()
|
2017-06-22 00:04:57 +08:00
|
|
|
|
2022-05-18 02:15:06 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/License.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|