Files
gentoo/net-analyzer/zmap/files/zmap-4.3.2-pkgconfig.patch
Nicolas PARLANT e443855ba9 net-analyzer/zmap: bump cmake_minimum_required and fix pkgconfig detection
bump cmake_minimum_required

use find_package to check pkgconfig instead of find_program to avoid
failure without native-symlinks

Closes: https://bugs.gentoo.org/952027
Signed-off-by: Nicolas PARLANT <nicolas.parlant@parhuet.fr>
Closes: https://github.com/gentoo/gentoo/pull/41276
Signed-off-by: Sam James <sam@gentoo.org>
2025-03-28 17:23:35 +00:00

19 lines
752 B
Diff

use find_package to prevent failure without native-symlinks
diff --git a/CMakeLists.txt b/CMakeLists.txt
index baa524a..60e3839 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,11 +85,7 @@ if (NOT FOUND_LIBUNISTRING)
message(FATAL_ERROR "Missing dependency: did not find libunistring, please install libunistring or equivalent. More details in INSTALL.md")
endif()
-find_program(FOUND_PKGCONFIG HINTS /usr/include/ NAMES pkg-config dev-util/pkgconf)
-if (NOT FOUND_PKGCONFIG)
- message(FATAL_ERROR "Missing dependency: did not find pkg-config, please install pkg-config or equivalent. More details in INSTALL.md")
-endif()
-
+find_package(PkgConfig REQUIRED)
if(ENABLE_DEVELOPMENT)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb")