copy_target_properties(${_interface_target} ${${_feature}_TARGETS} ${${_feature}_TARGETS_${_build}})
endif()
- export(TARGETS ${_interface_target}
- NAMESPACE "${DEAL_II_TARGET_NAME}::"
- FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake
- APPEND
- )
-
- install(TARGETS ${_interface_target}
- COMPONENT library
- EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
- )
-
if(${_feature}_SPLIT_CONFIGURATION)
# Future FIXME: change to block(PARENT_SCOPE)/endblock() (CMake 3.25)
list(APPEND DEAL_II_TARGETS_${_build} ${_interface_target})
)
endif()
- file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR})
- export(TARGETS ${DEAL_II_TARGET_NAME}_${build_lowercase}
- NAMESPACE "${DEAL_II_TARGET_NAME}::"
- FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake
- APPEND
- )
-
- install(TARGETS ${DEAL_II_TARGET_NAME}_${build_lowercase}
- COMPONENT library
- EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
- RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
- LIBRARY DESTINATION ${DEAL_II_LIBRARY_RELDIR}
- ARCHIVE DESTINATION ${DEAL_II_LIBRARY_RELDIR}
- )
-
target_link_libraries(${DEAL_II_TARGET_NAME} INTERFACE
"$<$<CONFIG:${build_camelcase}>:${DEAL_II_TARGET_NAME}::${DEAL_II_TARGET_NAME}_${build_lowercase}>"
)
endforeach()
+#
+# And install all targets:
+#
+
+set(_targets ${DEAL_II_TARGET_NAME})
+foreach(build ${DEAL_II_BUILD_TYPES})
+ string(TOLOWER ${build} build_lowercase)
+ list(APPEND _targets ${DEAL_II_TARGET_NAME}_${build_lowercase})
+endforeach()
+
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR})
-export(TARGETS ${DEAL_II_TARGET_NAME}
+export(TARGETS ${_targets} ${DEAL_II_TARGETS} ${DEAL_II_TARGETS_DEBUG} ${DEAL_II_TARGETS_RELEASE}
NAMESPACE "${DEAL_II_TARGET_NAME}::"
FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake
- APPEND
)
-install(TARGETS ${DEAL_II_TARGET_NAME}
+install(TARGETS ${_targets} ${DEAL_II_TARGETS} ${DEAL_II_TARGETS_DEBUG} ${DEAL_II_TARGETS_RELEASE}
COMPONENT library
EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
LIBRARY DESTINATION ${DEAL_II_LIBRARY_RELDIR}
ARCHIVE DESTINATION ${DEAL_II_LIBRARY_RELDIR}
-)
+ )
install(EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
NAMESPACE "${DEAL_II_TARGET_NAME}::"