Commit 504d4c0b authored by Dominik Charousset's avatar Dominik Charousset Committed by Dominik Charousset

Make CMake CAF variables globally available

Passing CAF variables only to the direct parent breaks setups with
deeper nesting. Setting the variables as cache variables instead makes
them visible everywhere.
parent 7ff36965
......@@ -707,9 +707,11 @@ endif()
# -- Export important variables to the parent scope ----------------------------
if(caf_is_subproject)
set(CAF_VERSION "${CAF_VERSION}" PARENT_SCOPE)
set(CAF_INCLUDE_DIRS "${CAF_INCLUDE_DIRS}" PARENT_SCOPE)
set(CAF_LIBRARIES "${CAF_LIBRARIES}" PARENT_SCOPE)
# Make sure parent projects can find build_config.hpp
list(APPEND CAF_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/libcaf_core")
set(CAF_VERSION "${CAF_VERSION}" CACHE INTERNAL "CAF release version")
set(CAF_LIBRARIES "${CAF_LIBRARIES}" CACHE INTERNAL "Library targets")
set(CAF_INCLUDE_DIRS "${CAF_INCLUDE_DIRS}" CACHE INTERNAL "Path to CAF headers")
endif()
################################################################################
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment