diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/gz-cmake/pkg-check-modules.diff | |
Diffstat (limited to 'vcpkg/ports/gz-cmake/pkg-check-modules.diff')
| -rw-r--r-- | vcpkg/ports/gz-cmake/pkg-check-modules.diff | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vcpkg/ports/gz-cmake/pkg-check-modules.diff b/vcpkg/ports/gz-cmake/pkg-check-modules.diff new file mode 100644 index 0000000..7249074 --- /dev/null +++ b/vcpkg/ports/gz-cmake/pkg-check-modules.diff @@ -0,0 +1,35 @@ +diff --git a/cmake/GzPkgConfig.cmake b/cmake/GzPkgConfig.cmake +index 5fcdb76..9ff169c 100644 +--- a/cmake/GzPkgConfig.cmake ++++ b/cmake/GzPkgConfig.cmake +@@ -105,6 +105,7 @@ macro(gz_pkg_check_modules_quiet package signature) + unset(${package}_LIBRARIES) + + pkg_check_modules(${package} ++ IMPORTED_TARGET + ${gz_pkg_check_modules_quiet_arg} + ${gz_pkg_check_modules_no_cmake_environment_path_arg} + ${signature}) +@@ -155,15 +156,13 @@ macro(gz_pkg_check_modules_quiet package signature) + # + # TODO: How would we deal with multiple modules that are in different + # directories? How does cmake-3.6+ handle that situation? +- _gz_pkgconfig_find_libraries( +- ${package}_LIBRARIES +- ${package} +- "${${package}_LIBRARIES}" +- "${${package}_LIBRARY_DIRS}") +- +- include(GzImportTarget) +- gz_import_target(${package} ${_gz_pkg_check_modules_interface_option} +- TARGET_NAME ${gz_pkg_check_modules_TARGET_NAME}) ++ ++ if(NOT TARGET ${gz_pkg_check_modules_TARGET_NAME}) ++ add_library(${gz_pkg_check_modules_TARGET_NAME} INTERFACE IMPORTED) ++ set_target_properties(${gz_pkg_check_modules_TARGET_NAME} PROPERTIES ++ INTERFACE_LINK_LIBRARIES PkgConfig::${package} ++ ) ++ endif() + + endif() + |