diff options
| author | bucurb <bobuc@microsoft.com> | 2021-07-23 05:44:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-22 21:44:41 -0700 |
| commit | 22a15e3995c3b6992a8f3c988a05ae413d32e9bd (patch) | |
| tree | 909788fe893b084443cea1ef3fb3ebb089b5b756 /ports | |
| parent | 3a59554bb3a53d8fe82c44ff0e009506abe13343 (diff) | |
| download | vcpkg-22a15e3995c3b6992a8f3c988a05ae413d32e9bd.tar.gz vcpkg-22a15e3995c3b6992a8f3c988a05ae413d32e9bd.zip | |
[libuuid] Added cmake config and targets (#18738)
* added cmake config and targets
* bumped version
* updated sha
* renamed targets to unofficial-
* updated sha
* Trigger builds
* PR comments
* updated sha
* Update the baseline version
* PR comments
* sha
Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
Co-authored-by: Billy Robert ONeal III <bion@microsoft.com>
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/libuuid/CMakeLists.txt | 28 | ||||
| -rw-r--r-- | ports/libuuid/CONTROL | 5 | ||||
| -rw-r--r-- | ports/libuuid/portfile.cmake | 3 | ||||
| -rw-r--r-- | ports/libuuid/unofficial-libuuid-config.cmake.in | 3 | ||||
| -rw-r--r-- | ports/libuuid/vcpkg.json | 8 |
5 files changed, 42 insertions, 5 deletions
diff --git a/ports/libuuid/CMakeLists.txt b/ports/libuuid/CMakeLists.txt index ff1edd0ef..9f4bb0605 100644 --- a/ports/libuuid/CMakeLists.txt +++ b/ports/libuuid/CMakeLists.txt @@ -29,7 +29,35 @@ endif() install(
TARGETS uuid
+ EXPORT uuid_targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
+
+include(CMakePackageConfigHelpers)
+set(PACKAGE_CONFIG_FILE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libuuid-config.cmake")
+set(INSTALL_CONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-libuuid")
+
+configure_package_config_file(unofficial-libuuid-config.cmake.in
+ "${PACKAGE_CONFIG_FILE}"
+ INSTALL_DESTINATION "${INSTALL_CONFIG_DIR}"
+)
+
+export(EXPORT uuid_targets
+ NAMESPACE unofficial::UUID::
+ FILE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libuuid-targets.cmake"
+)
+
+install(EXPORT uuid_targets
+ NAMESPACE unofficial::UUID::
+ FILE unofficial-libuuid-targets.cmake
+ DESTINATION "${INSTALL_CONFIG_DIR}"
+)
+
+install(
+ FILES
+ "${PACKAGE_CONFIG_FILE}"
+ DESTINATION
+ "${INSTALL_CONFIG_DIR}"
+)
diff --git a/ports/libuuid/CONTROL b/ports/libuuid/CONTROL deleted file mode 100644 index 5c11b9cac..000000000 --- a/ports/libuuid/CONTROL +++ /dev/null @@ -1,5 +0,0 @@ -Source: libuuid -Version: 1.0.3-7 -Homepage: https://sourceforge.net/projects/libuuid -Description: Universally unique id library -Supports: linux|osx
\ No newline at end of file diff --git a/ports/libuuid/portfile.cmake b/ports/libuuid/portfile.cmake index bb03f31f3..3e29431f4 100644 --- a/ports/libuuid/portfile.cmake +++ b/ports/libuuid/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_from_sourceforge( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${CMAKE_CURRENT_LIST_DIR}/config.linux.h + ${CMAKE_CURRENT_LIST_DIR}/unofficial-libuuid-config.cmake.in DESTINATION ${SOURCE_PATH} ) @@ -29,6 +30,8 @@ set(includedir \$\{prefix\}/include) configure_file(${SOURCE_PATH}/uuid.pc.in ${SOURCE_PATH}/uuid.pc @ONLY) file(INSTALL ${SOURCE_PATH}/uuid.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) file(INSTALL ${SOURCE_PATH}/uuid.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/unofficial-libuuid TARGET_PATH share/unofficial-libuuid) vcpkg_fixup_pkgconfig() file(INSTALL diff --git a/ports/libuuid/unofficial-libuuid-config.cmake.in b/ports/libuuid/unofficial-libuuid-config.cmake.in new file mode 100644 index 000000000..ed4900cea --- /dev/null +++ b/ports/libuuid/unofficial-libuuid-config.cmake.in @@ -0,0 +1,3 @@ +@PACKAGE_INIT@
+
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libuuid-targets.cmake")
diff --git a/ports/libuuid/vcpkg.json b/ports/libuuid/vcpkg.json new file mode 100644 index 000000000..0f88cf666 --- /dev/null +++ b/ports/libuuid/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libuuid", + "version": "1.0.3", + "port-version": 8, + "description": "Universally unique id library", + "homepage": "https://sourceforge.net/projects/libuuid", + "supports": "linux | osx" +} |
