summaryrefslogtreecommitdiff
path: root/cmake/helpers/EflMacros.cmake
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-27 10:13:34 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-27 10:13:34 -0200
commit361fe9603fdd3d7b8b84b36d6b4e2babab3e7586 (patch)
treea67e838345c8fad484181d06a2f9d979000f4519 /cmake/helpers/EflMacros.cmake
parent10c3736c87179408d9ffcefcd501d0d39113a6b7 (diff)
cmake: auto-include subdirectories with generated .eo.*
Diffstat (limited to 'cmake/helpers/EflMacros.cmake')
-rw-r--r--cmake/helpers/EflMacros.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
index 105af397c6..5918bfceed 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)
1444 endforeach() 1444 endforeach()
1445 1445
1446 set(all_eo_gen_files "") 1446 set(all_eo_gen_files "")
1447 set(extra_include_dirs "")
1447 foreach(file ${eo_files_private} ${eo_files_public}) 1448 foreach(file ${eo_files_private} ${eo_files_public})
1448 get_filename_component(ext ${file} EXT) 1449 get_filename_component(ext ${file} EXT)
1449 string(REGEX REPLACE "^${source_dir}/" "" filename "${file}") 1450 string(REGEX REPLACE "^${source_dir}/" "" filename "${file}")
@@ -1455,6 +1456,7 @@ function(EFL_CREATE_EO_RULES target source_dir generation_dir)
1455 file(MAKE_DIRECTORY "${generation_dir}/${reldir}") 1456 file(MAKE_DIRECTORY "${generation_dir}/${reldir}")
1456 get_filename_component(absdir "${file}" DIRECTORY) 1457 get_filename_component(absdir "${file}" DIRECTORY)
1457 set(rel_include_cmd -I${absdir}) 1458 set(rel_include_cmd -I${absdir})
1459 list(APPEND extra_include_dirs "${generation_dir}/${reldir}")
1458 else() 1460 else()
1459 set(rel_include_cmd) 1461 set(rel_include_cmd)
1460 endif() 1462 endif()
@@ -1497,6 +1499,10 @@ function(EFL_CREATE_EO_RULES target source_dir generation_dir)
1497 add_custom_target(${target}-eo 1499 add_custom_target(${target}-eo
1498 DEPENDS ${all_eo_gen_files} 1500 DEPENDS ${all_eo_gen_files}
1499 ) 1501 )
1502 if(extra_include_dirs)
1503 list(REMOVE_DUPLICATES extra_include_dirs)
1504 target_include_directories(${target} PUBLIC ${extra_include_dirs})
1505 endif()
1500 add_dependencies(${target} ${target}-eo) 1506 add_dependencies(${target} ${target}-eo)
1501 if(${EOLIAN_BIN} STREQUAL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/eolian_gen) 1507 if(${EOLIAN_BIN} STREQUAL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/eolian_gen)
1502 add_dependencies(${target}-eo eolian-bin) 1508 add_dependencies(${target}-eo eolian-bin)