diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-08-15 13:56:20 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-08-15 13:56:20 -0700 |
| commit | 28ae8e94d5ba7c285dde6b8820b3bd56f5f775f7 (patch) | |
| tree | a7952616386d4fa19ee9f44aff204e27de85f249 /ports/cpp-redis | |
| parent | 957cb214e92f45069f142d8b6ccf2a6425df9c51 (diff) | |
| parent | cd7f4cccffd915edc2d4b625ff32dea970ec073f (diff) | |
| download | vcpkg-28ae8e94d5ba7c285dde6b8820b3bd56f5f775f7.tar.gz vcpkg-28ae8e94d5ba7c285dde6b8820b3bd56f5f775f7.zip | |
Merge branch 'master' into qualifier_change
Diffstat (limited to 'ports/cpp-redis')
| -rw-r--r-- | ports/cpp-redis/CONTROL | 3 | ||||
| -rw-r--r-- | ports/cpp-redis/portfile.cmake | 62 | ||||
| -rw-r--r-- | ports/cpp-redis/tacopie/CMakeLists.txt | 8 |
3 files changed, 38 insertions, 35 deletions
diff --git a/ports/cpp-redis/CONTROL b/ports/cpp-redis/CONTROL index 30491dca4..36b2e8b55 100644 --- a/ports/cpp-redis/CONTROL +++ b/ports/cpp-redis/CONTROL @@ -1,3 +1,4 @@ Source: cpp-redis -Version: 3.5.1 +Version: 3.5.2-1 +Build-Depends: tacopie Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. diff --git a/ports/cpp-redis/portfile.cmake b/ports/cpp-redis/portfile.cmake index 42b2697e7..3a560a047 100644 --- a/ports/cpp-redis/portfile.cmake +++ b/ports/cpp-redis/portfile.cmake @@ -1,52 +1,46 @@ 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/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() + set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT") +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. +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 + 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/cpp_redis/*.hpp" "${SOURCE_PATH}/includes/cpp_redis/*.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/cpp_redis) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include) + +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 1" _contents "${_contents}") + file(WRITE ${file} "${_contents}") +endforeach() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpp-redis RENAME copyright) diff --git a/ports/cpp-redis/tacopie/CMakeLists.txt b/ports/cpp-redis/tacopie/CMakeLists.txt new file mode 100644 index 000000000..74959e2e1 --- /dev/null +++ b/ports/cpp-redis/tacopie/CMakeLists.txt @@ -0,0 +1,8 @@ +find_library(TACOPIE tacopie)
+find_path(TACOPIE_H tacopie/tacopie)
+
+message(STATUS "TACOPIE_H: ${TACOPIE_H}")
+
+add_library(tacopie INTERFACE)
+target_link_libraries(tacopie INTERFACE "${TACOPIE}")
+target_include_directories(tacopie INTERFACE "${TACOPIE_H}")
\ No newline at end of file |
