# Use this to set include paths which needs to be used by any target depending # on a library. After the library name, you pass any number of paths. macro(ROSA_set_external_include_reqs library) set(${library}_EXTERNAL_INCLUDES ${ARGN} CACHE INTERNAL "Externally required include paths for ${library}") endmacro() # Use this for a target to register library dependencies. # It also adds external include paths if the library have set any. # It ignores dependencies for ignored apps. macro(ROSA_add_library_dependencies target dependencies) if( NOT DEFINED ${target}_APP_IGNORED ) foreach( dependency ${dependencies} ) target_link_libraries(${target} ${dependency}) if( ${dependency}_EXTERNAL_INCLUDES ) include_directories(${${dependency}_EXTERNAL_INCLUDES}) endif() endforeach() endif() endmacro() # Use this for an app to register its executable. If the app is not included in # the build, it will be ignored. macro(ROSA_add_app app sources) if( ${app} IN_LIST ROSA_INCLUDE_APPS ) add_executable(${app} ${sources}) else() set(${app}_APP_IGNORED true) endif() endmacro()