Skip to content

Commit

Permalink
[libuuid] Added cmake config and targets (microsoft#18738)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Billy Robert ONeal III <[email protected]>
  • Loading branch information
3 people authored Jul 23, 2021
1 parent 3a59554 commit 22a15e3
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 7 deletions.
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}"
)
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
3 changes: 3 additions & 0 deletions ports/libuuid/unofficial-libuuid-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@PACKAGE_INIT@

include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libuuid-targets.cmake")
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"
}
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
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": "4058a76786f399c80e1973a4101e8291032b3e9b",
"version": "1.0.3",
"port-version": 8
},
{
"git-tree": "1462e6294a414e76e18cd6b2679b5906254751bd",
"version-string": "1.0.3-7",
Expand Down

0 comments on commit 22a15e3

Please sign in to comment.