From: Gustavo Sverzut Barbieri Date: Fri, 27 Jan 2017 12:13:34 +0000 (-0200) Subject: cmake: auto-include subdirectories with generated .eo.* X-Git-Tag: upstream/1.20.0~2267 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=361fe9603fdd3d7b8b84b36d6b4e2babab3e7586;p=platform%2Fupstream%2Fefl.git cmake: auto-include subdirectories with generated .eo.* --- diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake index 105af39..5918bfc 100644 --- a/cmake/helpers/EflMacros.cmake +++ b/cmake/helpers/EflMacros.cmake @@ -1444,6 +1444,7 @@ function(EFL_CREATE_EO_RULES target source_dir generation_dir) endforeach() set(all_eo_gen_files "") + set(extra_include_dirs "") foreach(file ${eo_files_private} ${eo_files_public}) get_filename_component(ext ${file} EXT) string(REGEX REPLACE "^${source_dir}/" "" filename "${file}") @@ -1455,6 +1456,7 @@ function(EFL_CREATE_EO_RULES target source_dir generation_dir) file(MAKE_DIRECTORY "${generation_dir}/${reldir}") get_filename_component(absdir "${file}" DIRECTORY) set(rel_include_cmd -I${absdir}) + list(APPEND extra_include_dirs "${generation_dir}/${reldir}") else() set(rel_include_cmd) endif() @@ -1497,6 +1499,10 @@ function(EFL_CREATE_EO_RULES target source_dir generation_dir) add_custom_target(${target}-eo DEPENDS ${all_eo_gen_files} ) + if(extra_include_dirs) + list(REMOVE_DUPLICATES extra_include_dirs) + target_include_directories(${target} PUBLIC ${extra_include_dirs}) + endif() add_dependencies(${target} ${target}-eo) if(${EOLIAN_BIN} STREQUAL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/eolian_gen) add_dependencies(${target}-eo eolian-bin)