[PATCH rdma-core] Use find_package(PkgConfig) not include(FindPkgConfig)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



find_package will fail if pkgconfig is not available, which avoids a
confusing cmake failure if the system doesn't have it.

Reported-by; Steve Wise <swise@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e37130e190147f..b55ce8276e888c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -133,7 +133,6 @@ set(DISTRO_FLAVOUR "None" CACHE
 set(BUILDLIB "${CMAKE_SOURCE_DIR}/buildlib")
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${BUILDLIB}")
 
-include(FindPkgConfig)
 include(CheckCCompilerFlag)
 include(CheckIncludeFile)
 include(CheckTypeSize)
@@ -351,6 +350,8 @@ FIND_PACKAGE(pandoc)
 # pthread
 FIND_PACKAGE (Threads REQUIRED)
 
+FIND_PACKAGE(PkgConfig REQUIRED)
+
 # libnl
 if (NOT DEFINED ENABLE_RESOLVE_NEIGH)
   set(ENABLE_RESOLVE_NEIGH "ON" CACHE BOOL "Enable internal resolution of neighbours for Etherent")
-- 
2.17.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux