mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 07:19:24 +08:00
6aa4fca940
* [many ports]switch to vcpkg-cmake / vckg-cmake-config part 5 * version * typo * typo * fix build * version * deprecated vcpkg_extract_source_archive_ex * version * fix argument * version * Rename argument * version * More changes about argument * wrong op * version --------- Co-authored-by: jyu49 <yu_jack@apple.com>
43 lines
1.3 KiB
CMake
43 lines
1.3 KiB
CMake
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO cpp-redis/tacopie
|
|
REF 3.2.0
|
|
SHA512 079b294b537aaffe3bcf43a485c3be5b15f633c3f7c70140032d60cb010d35b76e76ef4ddd7596f6bfaf3f7edca7cb086c67552efffbf65846e725d7be54ce72
|
|
HEAD_REF master
|
|
PATCHES
|
|
fix-cmakelists.patch
|
|
fix-export.patch
|
|
)
|
|
|
|
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
|
set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD")
|
|
else()
|
|
set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT")
|
|
endif()
|
|
|
|
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()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
endif()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|