mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-17 10:07:36 +00:00
[tacopie][cpp-redis] Update cpp-redis to depend on tacopie. Fix tacopie port.
This commit is contained in:
parent
bd2665ced9
commit
cc822ead1c
@ -1,3 +1,4 @@
|
||||
Source: cpp-redis
|
||||
Version: 3.5.1-1
|
||||
Build-Depends: tacopie
|
||||
Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining.
|
||||
|
@ -7,11 +7,13 @@ endif()
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Cylix/cpp_redis
|
||||
REF 3.5.1
|
||||
SHA512 2c50cf777d5955f7bcb94a55514fac444d0dcacc2df343dd89969889be7653a793620dbaac9d6dd0f444eee7f0664c4eb96a1d83477d207143660764afeea129
|
||||
REF 3.5.2
|
||||
SHA512 d19445c93fad9fba39c7aed07b2d196ec0c96366324a2a2ee856c930683b5428fe8b5bc46de4b2b23112aae83f8229a4703c2355d1c74831602ec3a7f8dac315
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/tacopie/CMakeLists.txt DESTINATION ${SOURCE_PATH}/tacopie)
|
||||
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD")
|
||||
else()
|
||||
@ -19,14 +21,13 @@ else()
|
||||
endif()
|
||||
|
||||
# cpp-redis 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.
|
||||
list(APPEND VCPKG_CXX_FLAGS_DEBUG "-RTC1")
|
||||
list(APPEND VCPKG_C_FLAGS_DEBUG "-RTC1")
|
||||
set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1")
|
||||
set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DUSE_CUSTOM_TCP_CLIENT=TRUE
|
||||
-DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG}
|
||||
)
|
||||
|
||||
@ -37,7 +38,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bi
|
||||
file(GLOB_RECURSE FILES "${CURRENT_PACKAGES_DIR}/include/*")
|
||||
foreach(file ${FILES})
|
||||
file(READ ${file} _contents)
|
||||
string(REPLACE "ifndef __CPP_REDIS_USE_CUSTOM_TCP_CLIENT" "if 0" _contents "${_contents}")
|
||||
string(REPLACE "ifndef __CPP_REDIS_USE_CUSTOM_TCP_CLIENT" "if 1" _contents "${_contents}")
|
||||
file(WRITE ${file} "${_contents}")
|
||||
endforeach()
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
message(STATUS "cpp-redis only supports static library linkage.")
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO Cylix/tacopie
|
||||
@ -8,44 +12,26 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
||||
set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD")
|
||||
else()
|
||||
set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT")
|
||||
endif()
|
||||
|
||||
# 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")
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG}
|
||||
)
|
||||
|
||||
vcpkg_build_cmake()
|
||||
vcpkg_install_cmake()
|
||||
|
||||
file(GLOB DLLS
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll"
|
||||
)
|
||||
file(GLOB LIBS
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/lib/*.lib"
|
||||
)
|
||||
file(GLOB DEBUG_DLLS
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll"
|
||||
)
|
||||
file(GLOB DEBUG_LIBS
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/*.lib"
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/lib/*.lib"
|
||||
)
|
||||
file(GLOB HEADERS "${SOURCE_PATH}/includes/tacopie/*.hpp" "${SOURCE_PATH}/includes/tacopie/*.hpp")
|
||||
if(DLLS)
|
||||
file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
endif()
|
||||
file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
if(DEBUG_DLLS)
|
||||
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/tacopie)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tacopie RENAME copyright)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user