2019-05-03 13:57:43 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2017-06-09 02:39:24 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2019-09-20 06:16:22 +08:00
|
|
|
REPO cpp-redis/tacopie
|
2018-01-03 06:54:10 +08:00
|
|
|
REF 3.2.0
|
|
|
|
SHA512 079b294b537aaffe3bcf43a485c3be5b15f633c3f7c70140032d60cb010d35b76e76ef4ddd7596f6bfaf3f7edca7cb086c67552efffbf65846e725d7be54ce72
|
2017-06-09 02:39:24 +08:00
|
|
|
HEAD_REF master
|
2018-01-03 06:54:10 +08:00
|
|
|
PATCHES
|
2023-03-02 02:39:29 +08:00
|
|
|
fix-cmakelists.patch
|
|
|
|
fix-export.patch
|
2018-01-03 06:54:10 +08:00
|
|
|
)
|
|
|
|
|
2017-08-02 06:23:45 +08:00
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
|
|
|
set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD")
|
|
|
|
else()
|
|
|
|
set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT")
|
|
|
|
endif()
|
|
|
|
|
2018-06-13 07:48:18 +08:00
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME)
|
|
|
|
# tacopie forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected.
|
|
|
|
set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1")
|
|
|
|
set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1")
|
|
|
|
endif()
|
2017-06-09 02:39:24 +08:00
|
|
|
|
2023-03-02 02:39:29 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-08-02 06:23:45 +08:00
|
|
|
OPTIONS
|
|
|
|
-DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG}
|
2017-06-09 02:39:24 +08:00
|
|
|
)
|
|
|
|
|
2023-03-02 02:39:29 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-06-09 02:39:24 +08:00
|
|
|
|
2023-03-02 02:39:29 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2018-01-03 06:54:10 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2023-03-02 02:39:29 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2018-01-03 06:54:10 +08:00
|
|
|
endif()
|
2017-06-09 02:39:24 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
2019-09-20 06:16:22 +08:00
|
|
|
|
2023-03-02 02:39:29 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|