INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}FeatureConfig.cmake
DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
COMPONENT library
)
#
-# Information about library targets
+# Information about library targets and feature configuration
#
# The library targets file:
# Full list of targets with "debug" and "optimized" keywords for easy use with TARGET_LINK_LIBRARIES:
SET(DEAL_II_TARGET "@CONFIG_TARGET@")
+
+# The feature configuration file:
+SET(DEAL_II_FEATURE_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}FeatureConfig.cmake")
SET(_log_detailed "${CMAKE_BINARY_DIR}/detailed.log")
SET(_log_summary "${CMAKE_BINARY_DIR}/summary.log")
-FILE(REMOVE ${_log_detailed} ${_log_summary})
+SET(_log_feature "${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}FeatureConfig.cmake")
+FILE(REMOVE ${_log_detailed} ${_log_summary} ${_log_feature})
MACRO(_both)
# Write to both log files:
# Only write to summary.log:
FILE(APPEND ${_log_summary} "${ARGN}")
ENDMACRO()
+MACRO(_featurelog)
+ # Only write to deal.IIFeatureConfig.cmake:
+ FILE(APPEND ${_log_feature} "${ARGN}")
+ENDMACRO()
_both(
"###
#
IF(NOT "${${_feature}_DIR}" STREQUAL "")
_detailed("# ${_feature}_DIR = ${${_feature}_DIR}\n")
+ _featurelog("SET(DEAL_II_${_feature}_DIR \"${${_feature}_DIR}\")\n")
ENDIF()
#
)
IF(DEFINED ${_feature}_${_var2})
_detailed("# ${_feature}_${_var2} = ${${_feature}_${_var2}}\n")
+ _featurelog("SET(DEAL_II_${_feature}_${_var2} \"${${_feature}_${_var2}}\")\n")
ENDIF()
ENDFOREACH()
ELSE()
--- /dev/null
+New: deal.IIFeatureConfig.cmake will contain detailed information about
+feature configuration and is installed along with other CMake files.
+These variables can be loaded by calling INCLUDE(${DEAL_II_FEATURE_CONFIG}).
+This is useful when users want to link in additional parts of dependencies, not
+required by deal.II (i.e. filesystem library from Boost package).
+<br>
+(Denis Davydov and Matthias Maier, 2017/05/29)