diff options
Diffstat (limited to 'vcpkg/ports/opentracing')
| -rw-r--r-- | vcpkg/ports/opentracing/fix-cmake.patch | 39 | ||||
| -rw-r--r-- | vcpkg/ports/opentracing/portfile.cmake | 28 | ||||
| -rw-r--r-- | vcpkg/ports/opentracing/vcpkg.json | 19 |
3 files changed, 86 insertions, 0 deletions
diff --git a/vcpkg/ports/opentracing/fix-cmake.patch b/vcpkg/ports/opentracing/fix-cmake.patch new file mode 100644 index 0000000..6e041b6 --- /dev/null +++ b/vcpkg/ports/opentracing/fix-cmake.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a451844..5966aa3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,11 +39,13 @@ set(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP) + set(CPACK_GENERATOR "RPM") + set(CPACK_COMPONENTS_IGNORE_GROUPS 1) + ++if(0) + include(CPack) + + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output) ++endif() + + # ============================================================================== + # Configure compilers +@@ -165,7 +167,7 @@ if (BUILD_SHARED_LIBS) + target_compile_definitions(opentracing PRIVATE OPENTRACING_EXPORTS) + install(TARGETS opentracing EXPORT OpenTracingTargets + COMPONENT DIST +- RUNTIME DESTINATION ${LIB_INSTALL_DIR} ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} + ) +diff --git a/mocktracer/CMakeLists.txt b/mocktracer/CMakeLists.txt +index 9835fe3..147179b 100644 +--- a/mocktracer/CMakeLists.txt ++++ b/mocktracer/CMakeLists.txt +@@ -21,6 +21,7 @@ if (BUILD_SHARED_LIBS) + install(TARGETS opentracing_mocktracer + COMPONENT DIST + EXPORT OpenTracingTargets ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR}) + diff --git a/vcpkg/ports/opentracing/portfile.cmake b/vcpkg/ports/opentracing/portfile.cmake new file mode 100644 index 0000000..5034bfa --- /dev/null +++ b/vcpkg/ports/opentracing/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO opentracing/opentracing-cpp
+ REF 4bb431f7728eaf383a07e86f9754a5b67575dab0 # v1.6.0
+ SHA512 1c69ff4cfd5f6037a48815367d3026c1bf06c3c49ebf232a64c43167385fb62e444c3b3224fc38f68ef0fdb378e3736db6ee6ba57160e6e578c87c09e92e527e
+ PATCHES
+ fix-cmake.patch
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DENABLE_LINTING=OFF
+ -DBUILD_TESTING=OFF
+ -DBUILD_DYNAMIC_LOADING=OFF
+ -DBUILD_STATIC_LIBS=${BUILD_STATIC}
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/OpenTracing)
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/opentracing/vcpkg.json b/vcpkg/ports/opentracing/vcpkg.json new file mode 100644 index 0000000..707e2f9 --- /dev/null +++ b/vcpkg/ports/opentracing/vcpkg.json @@ -0,0 +1,19 @@ +{ + "name": "opentracing", + "version": "1.6.0", + "port-version": 4, + "description": "C++ implementation of the OpenTracing API", + "homepage": "https://opentracing.io", + "license": "Apache-2.0", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |