aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/cmake.d
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-17 14:58:13 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-08-17 18:38:06 +0200
commitf6de0caaf46e14530a04b0792dfdcf6cc49fb78f (patch)
tree4c760e3ab0462faca6ddf16bea899ae17e29b9f5 /cmake/cmake.d
parent9c71a765f0e4f53a6bbae5f550515b93eb9d7c53 (diff)
Fix: missing dev pkg files error. Now well checked
Change-Id: I2c429322990f5a4f0ba192c49502026f4b37dd1d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d')
-rw-r--r--cmake/cmake.d/04-extra_targets.cmake11
1 files changed, 7 insertions, 4 deletions
diff --git a/cmake/cmake.d/04-extra_targets.cmake b/cmake/cmake.d/04-extra_targets.cmake
index 2143741..d54e128 100644
--- a/cmake/cmake.d/04-extra_targets.cmake
+++ b/cmake/cmake.d/04-extra_targets.cmake
@@ -84,12 +84,15 @@ foreach (PKG_CONFIG ${PKG_REQUIRED_LIST})
# Only doable within a native environment not under SDK
if( OSRELEASE MATCHES "debian" AND NOT DEFINED ENV{SDKTARGETSYSROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
execute_process(
- COMMAND dpkg -S *${XPREFIX}.pc
+ COMMAND pkg-config --print-provides ${XPREFIX}
OUTPUT_VARIABLE TMP_PKG_BIN
)
- #Need to be harden check
- string(REGEX REPLACE ":.*$" "" PKG_BIN ${TMP_PKG_BIN})
- set(DEB_PKG_DEPS "${DEB_PKG_DEPS} ${PKG_BIN} ${DEB_EXTRA_DEP}")
+ if(TMP_PKG_BIN)
+ string(REGEX REPLACE " *=.*$" "" PKG_BIN ${TMP_PKG_BIN})
+ set(DEB_PKG_DEPS "${DEB_PKG_DEPS} ${PKG_BIN} ${DEB_EXTRA_DEP}")
+ else()
+ message(FATAL_ERROR "-- ${Red}${XPREFIX} development files not installed. Abort.${ColourReset}")
+ endif()
endif()
endforeach()