diff options
Diffstat (limited to 'cmake/FindHWLOC.cmake')
-rw-r--r-- | cmake/FindHWLOC.cmake | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmake/FindHWLOC.cmake b/cmake/FindHWLOC.cmake index a831b5c72..522f52157 100644 --- a/cmake/FindHWLOC.cmake +++ b/cmake/FindHWLOC.cmake @@ -65,8 +65,9 @@ endif() # Optionally use pkg-config to detect include/library dirs (if pkg-config is available) # ------------------------------------------------------------------------------------- -include(FindPkgConfig) -find_package(PkgConfig QUIET) +include(CMakeFindDependencyMacro) +# include(FindPkgConfig) +find_dependency(PkgConfig QUIET) if( PKG_CONFIG_EXECUTABLE AND NOT HWLOC_GIVEN_BY_USER ) pkg_search_module(HWLOC hwloc) @@ -85,7 +86,7 @@ if( PKG_CONFIG_EXECUTABLE AND NOT HWLOC_GIVEN_BY_USER ) endif() endif() -endif( PKG_CONFIG_EXECUTABLE AND NOT HWLOC_GIVEN_BY_USER ) +endif() if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HWLOC_FOUND) OR (HWLOC_GIVEN_BY_USER) ) @@ -282,9 +283,9 @@ if( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HWLOC_FOUND) O set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_FLAGS) set(CMAKE_REQUIRED_LIBRARIES) - endif(HWLOC_LIBRARIES) + endif() -endif( (NOT PKG_CONFIG_EXECUTABLE) OR (PKG_CONFIG_EXECUTABLE AND NOT HWLOC_FOUND) OR (HWLOC_GIVEN_BY_USER) ) +endif() if (HWLOC_LIBRARIES) if (HWLOC_LIBRARY_DIRS) |