diff options
| author | David Garcia <48836389+david-antiteum@users.noreply.github.com> | 2019-04-08 07:22:49 +0200 |
|---|---|---|
| committer | Phil Christensen <philc@microsoft.com> | 2019-04-07 22:22:49 -0700 |
| commit | f7bc4cd54c568160deb9d6b96f37ab253939ca71 (patch) | |
| tree | e0299f3257fb8284e0b3051bff2b07386d637403 | |
| parent | 06990d6110b7d0c92452ab5f4bdd75067916c271 (diff) | |
| download | vcpkg-f7bc4cd54c568160deb9d6b96f37ab253939ca71.tar.gz vcpkg-f7bc4cd54c568160deb9d6b96f37ab253939ca71.zip | |
[opentracing] v1.5.1 (#5974)
* OpenTracing #5970
* No UWP. Static requires dynamic #5970
- Dynamic version can be build without the static one
- Static version can only be build when dynamic is also active
- UWP is not supported
* Linux support #5970
| -rw-r--r-- | ports/opentracing/CONTROL | 3 | ||||
| -rw-r--r-- | ports/opentracing/portfile.cmake | 63 |
2 files changed, 66 insertions, 0 deletions
diff --git a/ports/opentracing/CONTROL b/ports/opentracing/CONTROL new file mode 100644 index 000000000..293dd179c --- /dev/null +++ b/ports/opentracing/CONTROL @@ -0,0 +1,3 @@ +Source: opentracing
+Version: 1.5.1
+Description: C++ implementation of the OpenTracing API http://opentracing.io
diff --git a/ports/opentracing/portfile.cmake b/ports/opentracing/portfile.cmake new file mode 100644 index 000000000..cf82ddbf6 --- /dev/null +++ b/ports/opentracing/portfile.cmake @@ -0,0 +1,63 @@ +include(vcpkg_common_functions)
+
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore)
+ message(FATAL_ERROR "Error: UWP build is not supported.")
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ set( LOCAL_OPTIONS
+ -DBUILD_STATIC_LIBS=OFF
+ )
+else()
+ message("Static building is only possible when compiling static and dynamic versions at the same time. Enabling both.")
+ set(VCPKG_LIBRARY_LINKAGE dynamic)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO opentracing/opentracing-cpp
+ REF cf9b9d5c26ef985af2213521a4f0701b7e715db2
+ SHA512 75b77781c075c6814bf4a81d793e872ca47447fe82a4cad878bee99ffb2082e13e95ee285f32fb2e599765b08b4404d8e475bacff79a412a954d227b93ba53ef
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ ${OPTIONS}
+ ${LOCAL_OPTIONS}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/OpenTracing")
+
+vcpkg_copy_pdbs()
+
+# Move DLLs to /bin
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME)
+ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/opentracing.dll ${CURRENT_PACKAGES_DIR}/bin/opentracing.dll)
+
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/opentracing.dll ${CURRENT_PACKAGES_DIR}/debug/bin/opentracing.dll)
+
+ # Fix targets
+ file(READ ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-release.cmake RELEASE_CONFIG)
+ string(REPLACE "\${_IMPORT_PREFIX}/lib/opentracing.dll"
+ "\${_IMPORT_PREFIX}/bin/opentracing.dll" RELEASE_CONFIG ${RELEASE_CONFIG})
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-release.cmake "${RELEASE_CONFIG}")
+
+ file(READ ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-debug.cmake DEBUG_CONFIG)
+ string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/opentracing.dll"
+ "\${_IMPORT_PREFIX}/debug/bin/opentracing.dll" DEBUG_CONFIG ${DEBUG_CONFIG})
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-debug.cmake "${DEBUG_CONFIG}")
+ endif()
+endif()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/opentracing RENAME copyright)
+
+# Remove duplicate headers
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
