Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libuuid] Added cmake config and targets #18738

Merged
merged 15 commits into from
Jul 23, 2021
28 changes: 28 additions & 0 deletions ports/libuuid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
)
bucurb marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 0 additions & 5 deletions ports/libuuid/CONTROL

This file was deleted.

3 changes: 3 additions & 0 deletions ports/libuuid/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)

Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions ports/libuuid/unofficial-libuuid-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@PACKAGE_INIT@

if(NOT TARGET unofficial::UUID::UUID)
include(CMakeFindDependencyMacro)
bucurb marked this conversation as resolved.
Show resolved Hide resolved
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libuuid-targets.cmake")
endif()
bucurb marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 8 additions & 0 deletions ports/libuuid/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
}
8 changes: 4 additions & 4 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3539,8 +3539,8 @@
"libsigcpp-3": {
"baseline": "3.0.3",
"port-version": 1
},
"libsmb2": {
},
"libsmb2": {
"baseline": "2021-04-29",
"port-version": 0
},
Expand Down Expand Up @@ -3661,8 +3661,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",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libuuid.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bdadd106940f7c668a2891842c7745e6c7ce021c",
"version": "1.0.3",
"port-version": 8
},
{
"git-tree": "1462e6294a414e76e18cd6b2679b5906254751bd",
"version-string": "1.0.3-7",
Expand Down