summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-24 18:05:10 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commitfb990824a1b5489d9438956c41be2b3c3fde85f5 (patch)
tree6f994b4228c1c3399bae65bc7ec02519949783d3
parentdb6b08667404370cf9e2668370ab647e0697bde6 (diff)
Workaround to bugged list filter backport function
Change-Id: I520bcb09add89567083f0c06bde92dae08206c50 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--cmake/cmake.d/03-macros.cmake19
1 files changed, 13 insertions, 6 deletions
diff --git a/cmake/cmake.d/03-macros.cmake b/cmake/cmake.d/03-macros.cmake
index ff4388d..db31884 100644
--- a/cmake/cmake.d/03-macros.cmake
+++ b/cmake/cmake.d/03-macros.cmake
@@ -132,17 +132,24 @@ 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})
- set(LUA_LIST ${INPUT_FILES})
- set(JSON_LIST ${INPUT_FILES})
+ if(NOT DEFINED XML_FILES)
+ set(XML_LIST ${INPUT_FILES})
+ list_filter(XML_LIST "xml$")
+ endif()
+ if(NOT DEFINED LUA_FILES)
+ set(LUA_LIST ${INPUT_FILES})
+ list_filter(LUA_LIST "lua$")
+ endif()
+ if(NOT DEFINED JSON_FILES)
+ set(JSON_LIST ${INPUT_FILES})
+ list_filter(JSON_LIST "json$")
+ endif()
+
# These are v3.6 subcommand. Not used as default for now as
# many dev use Ubuntu 16.04 which have only 3.5 version
#list(FILTER XML_LIST INCLUDE REGEX "xml$")
#list(FILTER LUA_LIST INCLUDE REGEX "lua$")
#list(FILTER JSON_LIST INCLUDE REGEX "json$")
- list_filter(XML_LIST "xml$")
- list_filter(LUA_LIST "lua$")
- list_filter(JSON_LIST "json$")
add_custom_target(${TARGET_NAME}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_NAME}