diff options
Diffstat (limited to 'vcpkg/ports/tacopie')
| -rw-r--r-- | vcpkg/ports/tacopie/fix-cmakelists.patch | 27 | ||||
| -rw-r--r-- | vcpkg/ports/tacopie/fix-export.patch | 20 | ||||
| -rw-r--r-- | vcpkg/ports/tacopie/fix-mingw-build.patch | 11 | ||||
| -rw-r--r-- | vcpkg/ports/tacopie/portfile.cmake | 43 | ||||
| -rw-r--r-- | vcpkg/ports/tacopie/vcpkg.json | 13 |
5 files changed, 114 insertions, 0 deletions
diff --git a/vcpkg/ports/tacopie/fix-cmakelists.patch b/vcpkg/ports/tacopie/fix-cmakelists.patch new file mode 100644 index 0000000..48ba317 --- /dev/null +++ b/vcpkg/ports/tacopie/fix-cmakelists.patch @@ -0,0 +1,27 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,6 +26,7 @@ + cmake_minimum_required(VERSION 2.8.7) + set(CMAKE_MACOSX_RPATH 1) + include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) ++include(${CMAKE_ROOT}/Modules/GenerateExportHeader.cmake) + + + ### +@@ -153,6 +154,8 @@ IF (SELECT_TIMEOUT) + set_target_properties(${PROJECT} PROPERTIES COMPILE_DEFINITIONS "__TACOPIE_TIMEOUT=${SELECT_TIMEOUT}") + ENDIF(SELECT_TIMEOUT) + ++generate_export_header(${PROJECT} EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/tacopie/utils/${PROJECT}_export.hpp) ++target_include_directories(${PROJECT} PUBLIC ${CMAKE_BINARY_DIR}) + + ### + # install +@@ -164,6 +167,7 @@ install(DIRECTORY DESTINATION ${CMAKE_BINARY_DIR}/bin/) + install (DIRECTORY ${CMAKE_BINARY_DIR}/lib/ DESTINATION lib USE_SOURCE_PERMISSIONS) + install (DIRECTORY ${CMAKE_BINARY_DIR}/bin/ DESTINATION bin USE_SOURCE_PERMISSIONS) + install (DIRECTORY ${TACOPIE_INCLUDES}/ DESTINATION include USE_SOURCE_PERMISSIONS) ++install (FILES ${CMAKE_BINARY_DIR}/tacopie/utils/${PROJECT}_export.hpp DESTINATION include/tacopie/utils) + + + ### diff --git a/vcpkg/ports/tacopie/fix-export.patch b/vcpkg/ports/tacopie/fix-export.patch new file mode 100644 index 0000000..d971b83 --- /dev/null +++ b/vcpkg/ports/tacopie/fix-export.patch @@ -0,0 +1,20 @@ +--- a/includes/tacopie/utils/logger.hpp ++++ b/includes/tacopie/utils/logger.hpp +@@ -26,6 +26,8 @@ + #include <mutex> + #include <string> + ++#include <tacopie/utils/tacopie_export.hpp> ++ + namespace tacopie { + + //! +@@ -161,7 +163,7 @@ private: + //! variable containing the current logger + //! by default, not set (no logs) + //! +-extern std::unique_ptr<logger_iface> active_logger; ++extern TACOPIE_EXPORT std::unique_ptr<logger_iface> active_logger; + + //! + //! debug logging diff --git a/vcpkg/ports/tacopie/fix-mingw-build.patch b/vcpkg/ports/tacopie/fix-mingw-build.patch new file mode 100644 index 0000000..a7b5bd4 --- /dev/null +++ b/vcpkg/ports/tacopie/fix-mingw-build.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ project(${PROJECT} CXX) + ### + # compilation options + ### +-IF (WIN32) ++IF (MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /O2 /bigobj") + + # was causing conflics with gtest build diff --git a/vcpkg/ports/tacopie/portfile.cmake b/vcpkg/ports/tacopie/portfile.cmake new file mode 100644 index 0000000..1dc9673 --- /dev/null +++ b/vcpkg/ports/tacopie/portfile.cmake @@ -0,0 +1,43 @@ +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 + fix-mingw-build.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) diff --git a/vcpkg/ports/tacopie/vcpkg.json b/vcpkg/ports/tacopie/vcpkg.json new file mode 100644 index 0000000..6dc3839 --- /dev/null +++ b/vcpkg/ports/tacopie/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "tacopie", + "version": "3.2.0", + "port-version": 6, + "description": "Tacopie is a TCP Client & Server C++11 library", + "homepage": "https://github.com/cpp-redis/tacopie", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} |