From 006ef4951ebce8f9fcd1432991ff33f4f138e718 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 27 May 2018 22:38:14 +0200 Subject: cmake/pkg-config: print informative message --- cmake/opentrack-pkg-config.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/opentrack-pkg-config.cmake b/cmake/opentrack-pkg-config.cmake index e9136563..218bba6e 100644 --- a/cmake/opentrack-pkg-config.cmake +++ b/cmake/opentrack-pkg-config.cmake @@ -6,11 +6,13 @@ function(otr_pkgconfig target) set(ldflags "") foreach(i ${ARGN}) set(k pkg-config_${i}) - pkg_check_modules(${k} REQUIRED QUIET ${i}) + pkg_check_modules(${k} QUIET ${i}) if(${${k}_FOUND}) set(cflags "${cflags} ${${k}_CFLAGS} ") set(includes ${includes} ${${k}_INCLUDE_DIRS} ${${k}_INCLUDEDIR}) set(ldflags "${ldflags} ${${k}_LDFLAGS} ") + else() + message(FATAL_ERROR "Can't find '${i}'. Please install development files for this package.") endif() endforeach() #message(STATUS "foo | ${cflags} | ${includes} | ${ldflags}") -- cgit v1.2.3