Skip to content
Snippets Groups Projects
Commit ce5bbcc2 authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Added function add_autogen_include.

parent d546b160
No related branches found
No related tags found
No related merge requests found
......@@ -65,3 +65,16 @@ macro(ADD_GOOGLE_TESTS executable)
endforeach()
endforeach()
endmacro()
# Adds the include dir containing the autogenerated files to the PUBLIC
# interface of the given target
function(add_autogen_include target)
get_property(IsMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(IsMultiConfig)
target_include_directories(${target} PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/${target}_autogen/include_$<CONFIG>)
else()
target_include_directories(${target} PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/${target}_autogen/include)
endif()
endfunction()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment