Skip to content

Commit 75b84eb

Browse files
committed
[build] Centralizes pkg-config detection and closes #156
1 parent b23160e commit 75b84eb

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,12 @@ endmacro()
272272
# End of macros
273273
# ----------------------------------------------------------------------------
274274

275+
# Double-checks pkg-config is reachable
276+
include(FindPkgConfig)
277+
if(NOT PKG_CONFIG_FOUND)
278+
message(FATAL_ERROR "error: could not find binary for `pkg-config' - you cannot build Bob without it.")
279+
endif()
280+
275281
# Project files
276282
set(ENABLED_PACKAGES "")
277283
add_subdirectory(src)

src/blitz.cmake

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
# also defined, but not for general use are
88
# Blitz_LIBRARY, where to find the Blitz library.
99

10-
include(FindPkgConfig)
11-
1210
execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} blitz --silence-errors --modversion OUTPUT_VARIABLE PKG_CONFIG_blitz_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
1311

1412
if(PKG_CONFIG_blitz_VERSION)

src/io/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ endif()
4444

4545
# Matio
4646
if (WITH_MATIO)
47-
include(FindPkgConfig)
4847
pkg_check_modules(matio matio)
4948
if(matio_FOUND)
5049
include(CheckCSourceCompiles)

0 commit comments

Comments
 (0)