if(DEAL_II_HAVE_BUNDLED_DIRECTORY)
add_subdirectory(bundled)
endif()
-add_subdirectory(source) # has to be included after bundled
-add_subdirectory(cmake/config) # has to be included after source
+# Now that we have collected information about the configuration
+# and the bundled directory, set up the compilation of the
+# library from the files in the source/ directory.
+add_subdirectory(source)
+
+# Then also set up installation and other targets.
+add_subdirectory(cmake/config)
+
+# Now also configure installation of the examples. This relies on
+# the correctly set up library, so needs to come after configuration
+# in source/ and cmake/config/
add_subdirectory(examples)
add_subdirectory(contrib/utilities)
## ------------------------------------------------------------------------
#
-# This file sets up the project configuration consisting of
+# This file sets up the project installation and configuration consisting of
#
# deal.IIConfig.cmake
# deal.IIVersionConfig.cmake
# two distinct setups.
#
+
+message(STATUS "Setting up library installation")
+
+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 ${_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
+)
+
+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}::"
+ DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
+ COMPONENT library
+ )
+
+message(STATUS "Setting up library installation - Done")
+
+
message(STATUS "Setting up project configuration")
#
)
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 ${_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
-)
-
-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}::"
- DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
- COMPONENT library
- )
-
message(STATUS "Setting up library - Done")