summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-21 22:33:03 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commit0533db1e8c98cd56c596e74f40a5692c957ac16b (patch)
tree9c5f3cc898a36f94357ec2a10bf7dc41f45a16ca /cmake
parent6e9f005abf1b99b4439952ac5a92b2404cc6b401 (diff)
Add macros to make a 2nd pass on required module
Useful when adding module dependant of distro as they do not named their packages the same way... Change-Id: I0422ce4cdad48f9e815d24510376ad11941d5e3d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/cmake.d/03-macros.cmake9
-rw-r--r--cmake/common.cmake1
2 files changed, 9 insertions, 1 deletions
diff --git a/cmake/cmake.d/03-macros.cmake b/cmake/cmake.d/03-macros.cmake
index 6e223b2..88d6dd4 100644
--- a/cmake/cmake.d/03-macros.cmake
+++ b/cmake/cmake.d/03-macros.cmake
@@ -121,6 +121,15 @@ macro(configure_files_in_dir dir)
endforeach()
endmacro(configure_files_in_dir)
+macro(add_required_module PKG_CONFIG)
+ string(REGEX REPLACE "[<>]?=.*$" "" XPREFIX ${PKG_CONFIG})
+ PKG_CHECK_MODULES(${XPREFIX} REQUIRED ${PKG_CONFIG})
+
+ INCLUDE_DIRECTORIES(${${XPREFIX}_INCLUDE_DIRS})
+ list(APPEND link_libraries ${${XPREFIX}_LDFLAGS})
+ add_compile_options (${${XPREFIX}_CFLAGS})
+endmacro(add_required_module)
+
# Create custom target dedicated for HTML5 and DATA AGL target type
macro(add_input_files INPUT_FILES)
set(XML_LIST ${INPUT_FILES})
diff --git a/cmake/common.cmake b/cmake/common.cmake
index 06d04c6..1a7a2f0 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -36,7 +36,6 @@ foreach(file ${system_cmakefiles} ${home_cmakefiles} ${project_cmakefiles})
include(${file})
endforeach()
-message(STATUS "${ENTRY_POINT}/cmake/[0-9][0-9]-${OSRELEASE}*.cmake")
file(GLOB project_cmakefiles ${ENTRY_POINT}/cmake/[0-9][0-9]-common*.cmake ${ENTRY_POINT}/cmake/[0-9][0-9]-${OSRELEASE}*.cmake )
list(SORT project_cmakefiles)
foreach(file ${project_cmakefiles})