aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/macros.cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-22 18:40:26 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-22 18:40:26 +0200
commit54a3a12345c741e82ce53a9912303b46b4dc9f11 (patch)
tree47e4248800aaf5a25c39839c23cc6e7bae6bc475 /cmake/macros.cmake
parentef38e4fe94c9f32adf572bf1df68e78f4eaaffa2 (diff)
Fix: Test modules package dependencies versions.
Change-Id: I3cb68b4c431c064e5a34cac5466c3f8afdf06f3b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/macros.cmake')
-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