summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-22 18:40:26 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:20 +0200
commit44743cec358c6f35df66ee794b32cec75a6035b0 (patch)
tree6ff850c27b19f2dee3f7c607ddd5cf224e2f4188
parentce86801334933a2f4a1e78570a417d3ad37b4128 (diff)
Fix: Test modules package dependencies versions.
Change-Id: I3cb68b4c431c064e5a34cac5466c3f8afdf06f3b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--cmake/macros.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmake/macros.cmake b/cmake/macros.cmake
index 55419f2..b1a5f68 100644
--- a/cmake/macros.cmake
+++ b/cmake/macros.cmake
@@ -267,11 +267,12 @@ set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH ON CACHE BOOLEAN "Flag for using prefix pat
# Loop on required package and add options
foreach (PKG_CONFIG ${PKG_REQUIRED_LIST})
- PKG_CHECK_MODULES(${PKG_CONFIG} REQUIRED ${PKG_CONFIG})
+ string(REGEX REPLACE "[<>]?=.*$" "" XPREFIX ${PKG_CONFIG})
+ PKG_CHECK_MODULES(${XPREFIX} REQUIRED ${PKG_CONFIG})
- INCLUDE_DIRECTORIES(${${PKG_CONFIG}_INCLUDE_DIRS})
- list (APPEND link_libraries ${${PKG_CONFIG}_LIBRARIES})
- add_compile_options (${${PKG_CONFIG}_CFLAGS})
+ INCLUDE_DIRECTORIES(${${XPREFIX}_INCLUDE_DIRS})
+ list (APPEND link_libraries ${${XPREFIX}_LIBRARIES})
+ add_compile_options (${${XPREFIX}_CFLAGS})
endforeach(PKG_CONFIG)
# Optional LibEfence Malloc debug library