[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>
This commit is contained in:
bucurb 2021-07-23 05:44:41 +01:00 committed by GitHub
parent 3a59554bb3
commit 22a15e3995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 49 additions and 7 deletions

View File

@ -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}"
)

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,3 @@
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libuuid-targets.cmake")

8
ports/libuuid/vcpkg.json Normal file
View File

@ -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"
}

View File

@ -3701,8 +3701,8 @@
"port-version": 0
},
"libuuid": {
"baseline": "1.0.3-7",
"port-version": 0
"baseline": "1.0.3",
"port-version": 8
},
"libuv": {
"baseline": "1.41.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4058a76786f399c80e1973a4101e8291032b3e9b",
"version": "1.0.3",
"port-version": 8
},
{
"git-tree": "1462e6294a414e76e18cd6b2679b5906254751bd",
"version-string": "1.0.3-7",