aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-24 18:05:10 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-08-24 18:05:23 +0200
commit6ca5346775deff613fc3d30b461c98b5711a3f0c (patch)
tree264e3738ee159dc9ede236c5f28f88e8371cd55d
parent13239eb068fc122af9338e60c144f9697c0bb2bc (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}