From 8b8e0a230677b5e456a9d9fb8d9ad3aebfe2b8d1 Mon Sep 17 00:00:00 2001 From: maier Date: Sun, 15 Sep 2013 01:17:10 +0000 Subject: [PATCH] CMake: Improvement: Support direct build directory usage With this commit it is now possible to use the build directory directly without the need to install the project first. git-svn-id: https://svn.dealii.org/trunk@30705 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/bundled/CMakeLists.txt | 6 + deal.II/cmake/config/CMakeLists.txt | 122 ++++++++++++++---- deal.II/cmake/config/Config.cmake.in | 33 ++++- deal.II/cmake/config/Make.global_options.in | 13 +- .../macros/macro_expand_instantiations.cmake | 10 +- deal.II/cmake/scripts/CMakeLists.txt | 32 +++-- deal.II/cmake/setup_finalize.cmake | 11 ++ deal.II/cmake/setup_post_project_call.cmake | 7 +- deal.II/doc/news/changes.h | 10 ++ deal.II/source/CMakeLists.txt | 11 ++ 10 files changed, 207 insertions(+), 48 deletions(-) diff --git a/deal.II/bundled/CMakeLists.txt b/deal.II/bundled/CMakeLists.txt index 846b614f2a..897b4632e1 100644 --- a/deal.II/bundled/CMakeLists.txt +++ b/deal.II/bundled/CMakeLists.txt @@ -35,6 +35,9 @@ IF(FEATURE_BOOST_BUNDLED_CONFIGURED) COMPONENT library PATTERN ".svn" EXCLUDE ) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_source_includes + "${BOOST_FOLDER}/include\n" + ) ADD_SUBDIRECTORY(${BOOST_FOLDER}/libs/serialization/src) @@ -88,6 +91,9 @@ IF(FEATURE_THREADS_BUNDLED_CONFIGURED) FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE ) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_source_includes + "${TBB_FOLDER}/include\n" + ) ADD_SUBDIRECTORY(${TBB_FOLDER}/src) ENDIF() diff --git a/deal.II/cmake/config/CMakeLists.txt b/deal.II/cmake/config/CMakeLists.txt index 49f9893e65..48cf9f0c92 100644 --- a/deal.II/cmake/config/CMakeLists.txt +++ b/deal.II/cmake/config/CMakeLists.txt @@ -14,13 +14,32 @@ ## ## --------------------------------------------------------------------- +# +# This file sets up the project configuration consisting of +# +# Make.global_options (legacy) +# deal.IIConfig.cmake +# deal.IIVersionConfig.cmake +# +# and copies it (a) to the build directory and (b) prepares it for later +# installation (the copy in CMAKE_CURRENT_BINARY_DIR). +# + +# +# Read in auxiliary include directories for the build directory +# configuration: +# +FILE(STRINGS + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_source_includes + deal_ii_source_includes + ) # # Configure the template-arguments file # -CONFIGURE_FILE( +CONFIGURE_FILE( # for binary dir: ${CMAKE_CURRENT_SOURCE_DIR}/template-arguments.in - ${CMAKE_CURRENT_BINARY_DIR}/template-arguments + ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments ) @@ -30,7 +49,13 @@ CONFIGURE_FILE( # # ######################################################################## -INSTALL(FILES +FILE(COPY # for binary dir: + ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake + ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_invoke_autopilot.cmake + ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_setup_target.cmake + DESTINATION ${CMAKE_BINARY_DIR}/${DEAL_II_CMAKE_MACROS_RELDIR} + ) +INSTALL(FILES # for installation: ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_invoke_autopilot.cmake ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_setup_target.cmake @@ -93,24 +118,37 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES}) ) ENDFOREACH() -SET(CONFIG_INCLUDE_DIRS +# +# For binary dir: +# +SET(CONFIG_INCLUDE_DIRS_BINARY + \${DEAL_II_PATH}/include + \${DEAL_II_PATH}/include/deal.II + ${CMAKE_SOURCE_DIR}/include/ + ${CMAKE_SOURCE_DIR}/include/deal.II + ${deal_ii_source_includes} + ${DEAL_II_USER_INCLUDE_DIRS} + ) +# +# For installation: +# +SET(CONFIG_INCLUDE_DIRS_INSTALLATION \${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR} \${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}/deal.II \${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled ${DEAL_II_USER_INCLUDE_DIRS} ) - CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake + ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake @ONLY ) - # # Append feature configuration: # - -SET(_file ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake) +SET(_file + ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake + ) FILE(APPEND ${_file} "\n\n#\n# Feature configuration:\n#\n\n" ) @@ -123,16 +161,15 @@ FOREACH(var ${res}) ENDIF() ENDFOREACH() - CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/ConfigVersion.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake + ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake @ONLY ) 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_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake + ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR} COMPONENT library ) @@ -150,13 +187,6 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) # Transform some cmake lists into a string that the old Makefile # mechanism actually understands: # - TO_STRING_AND_ADD_PREFIX(MAKEFILE_INCLUDE_DIRS "${CMAKE_INCLUDE_FLAG_CXX}" - $(D)/${DEAL_II_INCLUDE_RELDIR} - $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II - $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled - ${DEAL_II_USER_INCLUDE_DIRS} - ${DEAL_II_INCLUDE_DIRS} - ) FOREACH(build ${DEAL_II_BUILD_TYPES}) TO_STRING_AND_ADD_PREFIX(MAKEFILE_DEFINITIONS_${build} @@ -241,16 +271,62 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) COND_SET_TO_YES(DEAL_II_WITH_P4EST MAKEFILE_P4EST) COND_SET_TO_YES(DEAL_II_WITH_MPI MAKEFILE_MPI) + # + # For binary dir: + # + SET(MAKEFILE_D_BINARY ${CMAKE_BINARY_DIR}) + TO_STRING_AND_ADD_PREFIX(MAKEFILE_INCLUDE_DIRS_BINARY "${CMAKE_INCLUDE_FLAG_CXX}" + $(D)/install + $(D)/install/deal.II + ${CMAKE_SOURCE_DIR}/include/ + ${CMAKE_SOURCE_DIR}/include/deal.II + ${deal_ii_source_includes} + ${DEAL_II_USER_INCLUDE_DIRS} + ) + # + # For installation: + # + SET(MAKEFILE_D_INSTALLATION ${CMAKE_INSTALL_PREFIX}) + TO_STRING_AND_ADD_PREFIX(MAKEFILE_INCLUDE_DIRS_INSTALLATION "${CMAKE_INCLUDE_FLAG_CXX}" + $(D)/${DEAL_II_INCLUDE_RELDIR} + $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II + $(D)/${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled + ${DEAL_II_USER_INCLUDE_DIRS} + ) CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in - ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options + ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/Make.global_options ) INSTALL(FILES - ${CMAKE_CURRENT_BINARY_DIR}/template-arguments - ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options + ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/template-arguments + ${CMAKE_BINARY_DIR}/${DEAL_II_COMMON_RELDIR}/Make.global_options DESTINATION ${DEAL_II_COMMON_RELDIR} COMPONENT compat_files ) ENDIF() +# +# Finally, add a target to create the "binary" file in +# ${DEAL_II_PROJECT_CONFIG_RELDIR} and add it to the library target: +# +ADD_CUSTOM_TARGET(setup_build_dir ALL + COMMAND ${CMAKE_COMMAND} -E touch + ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/binary + COMMAND ${CMAKE_COMMAND} -E touch + ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake + ) +ADD_DEPENDENCIES(library setup_build_dir) + +# +# And a script to remove it upon installation from the install prefix: +# +INSTALL(CODE + " + FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEAL_II_PROJECT_CONFIG_RELDIR}/binary) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E touch + ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake + ) + " + COMPONENT library + ) diff --git a/deal.II/cmake/config/Config.cmake.in b/deal.II/cmake/config/Config.cmake.in index 150793f5cc..53417f2bdf 100644 --- a/deal.II/cmake/config/Config.cmake.in +++ b/deal.II/cmake/config/Config.cmake.in @@ -66,6 +66,14 @@ WHILE(NOT "${_path}" STREQUAL "") GET_FILENAME_COMPONENT(_path "${_path}" PATH) ENDWHILE() +# +# Is this project reside in a build directory or at an installed location? +# + +IF(EXISTS ${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/binary) + SET(DEAL_II_BUILD_DIR TRUE) +ENDIF() + # # Print a message after inclusion of this file: # @@ -73,9 +81,15 @@ ENDWHILE() SET(DEAL_II_PROJECT_CONFIG_INCLUDED TRUE) IF(NOT ${DEAL_II_PACKAGE_NAME}_FIND_QUIETLY) - MESSAGE(STATUS - "Using the ${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION} installation found at ${DEAL_II_PATH}" - ) + IF(DEAL_II_BUILD_DIR) + MESSAGE(STATUS + "Using the ${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION} build directory found at ${DEAL_II_PATH}" + ) + ELSE() + MESSAGE(STATUS + "Using the ${DEAL_II_PACKAGE_NAME}-${DEAL_II_PACKAGE_VERSION} installation found at ${DEAL_II_PATH}" + ) + ENDIF() ENDIF() @@ -138,8 +152,11 @@ SET(DEAL_II_STATIC_EXECUTABLE "@DEAL_II_STATIC_EXECUTABLE@") # # Information about include directories and libraries # - -SET(DEAL_II_INCLUDE_DIRS "@CONFIG_INCLUDE_DIRS@") +IF(DEAL_II_BUILD_DIR) + SET(DEAL_II_INCLUDE_DIRS "@CONFIG_INCLUDE_DIRS_BINARY@") +ELSE() + SET(DEAL_II_INCLUDE_DIRS "@CONFIG_INCLUDE_DIRS_INSTALLATION@") +ENDIF() # Full list of libraries for the debug target: SET(DEAL_II_LIBRARIES_DEBUG "@CONFIG_LIBRARIES_DEBUG@") @@ -155,7 +172,11 @@ SET(DEAL_II_LIBRARIES "@CONFIG_LIBRARIES@") # Information about library targets # -SET(DEAL_II_TARGET_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake") +IF(DEAL_II_BUILD_DIR) + SET(DEAL_II_TARGET_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}BuildTargets.cmake") +ELSE() + SET(DEAL_II_TARGET_CONFIG "${DEAL_II_PATH}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake") +ENDIF() # The Debug target: SET(DEAL_II_TARGET_DEBUG "@CONFIG_TARGET_DEBUG@") diff --git a/deal.II/cmake/config/Make.global_options.in b/deal.II/cmake/config/Make.global_options.in index cc00835e74..3ebd2f232a 100644 --- a/deal.II/cmake/config/Make.global_options.in +++ b/deal.II/cmake/config/Make.global_options.in @@ -23,7 +23,12 @@ # -D = @CMAKE_INSTALL_PREFIX@ +ifeq ($(wildcard $(D)/@DEAL_II_PROJECT_CONFIG_RELDIR@/binary),) + D = @MAKEFILE_D_INSTALLATION@ +else + D = @MAKEFILE_D_BINARY@ +endif + CXX = @CMAKE_CXX_COMPILER@ CXX-ID = @CMAKE_CXX_COMPILER_ID@ CXX-VERSION = @CMAKE_CXX_COMPILER_VERSION@ @@ -82,7 +87,11 @@ lib-deal2.g = @MAKEFILE_TARGETS_DEBUG@ # Include paths as command line flags -INCLUDE = @MAKEFILE_INCLUDE_DIRS@ +ifeq ($(wildcard $(D)/@DEAL_II_PROJECT_CONFIG_RELDIR@/binary),) + INCLUDE = @MAKEFILE_INCLUDE_DIRS_INSTALLATION@ +else + INCLUDE = @MAKEFILE_INCLUDE_DIRS_BINARY@ +endif # compiler flags for debug and optimized mode diff --git a/deal.II/cmake/macros/macro_expand_instantiations.cmake b/deal.II/cmake/macros/macro_expand_instantiations.cmake index 5516eb01de..c842ba0d96 100644 --- a/deal.II/cmake/macros/macro_expand_instantiations.cmake +++ b/deal.II/cmake/macros/macro_expand_instantiations.cmake @@ -35,21 +35,15 @@ MACRO(EXPAND_INSTANTIATIONS _target _inst_in_files) - IF(CMAKE_CROSSCOMPILING) - SET(_ei_exec native-expand_instantiations) - ELSE() - SET(_ei_exec expand_instantiations) - ENDIF() - FOREACH (_inst_in_file ${_inst_in_files}) STRING(REGEX REPLACE "\\.in$" "" _inst_file "${_inst_in_file}" ) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file} - DEPENDS ${_ei_exec} + DEPENDS expand_instantiations ${CMAKE_BINARY_DIR}/cmake/config/template-arguments ${CMAKE_CURRENT_SOURCE_DIR}/${_inst_in_file} - COMMAND ${_ei_exec} + COMMAND expand_instantiations ARGS ${CMAKE_BINARY_DIR}/cmake/config/template-arguments < ${CMAKE_CURRENT_SOURCE_DIR}/${_inst_in_file} > ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file} diff --git a/deal.II/cmake/scripts/CMakeLists.txt b/deal.II/cmake/scripts/CMakeLists.txt index 5ac93c43cc..96539b7835 100644 --- a/deal.II/cmake/scripts/CMakeLists.txt +++ b/deal.II/cmake/scripts/CMakeLists.txt @@ -14,14 +14,22 @@ ## ## --------------------------------------------------------------------- -ADD_EXECUTABLE(expand_instantiations expand_instantiations.cc) IF(NOT CMAKE_CROSSCOMPILING) - # - # Export expand_instantiations for use in cross compilation: - # + ADD_EXECUTABLE(expand_instantiations expand_instantiations.cc) + + IF(DEAL_II_COMPONENT_COMPAT_FILES) + SET_TARGET_PROPERTIES(expand_instantiations + PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/common/scripts + ) + INSTALL(TARGETS expand_instantiations + EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets + DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts + COMPONENT compat_files + ) + ENDIF() + EXPORT(TARGETS expand_instantiations - FILE ${CMAKE_CURRENT_BINARY_DIR}/importExecutables.cmake - NAMESPACE native- # Prefix a namespace + FILE ${CMAKE_BINARY_DIR}/importExecutables.cmake ) ENDIF() @@ -30,10 +38,14 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) # Build and install the old dependency_resolution and report_features # executables: # + INCLUDE_DIRECTORIES( BEFORE # Ensure deal.II include directories come first - ${CMAKE_BINARY_DIR}/include/ + # + # Reverse order due to BEFORE: + # ${CMAKE_SOURCE_DIR}/include/ + ${CMAKE_BINARY_DIR}/include/ ) ADD_EXECUTABLE(make_dependencies make_dependencies.cc) @@ -81,7 +93,11 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) ADD_CUSTOM_TARGET(run_report_features COMMAND report_features) ENDIF() - INSTALL(TARGETS make_dependencies report_features expand_instantiations + SET_TARGET_PROPERTIES(make_dependencies report_features + PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/common/scripts + ) + + INSTALL(TARGETS make_dependencies report_features EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts COMPONENT compat_files diff --git a/deal.II/cmake/setup_finalize.cmake b/deal.II/cmake/setup_finalize.cmake index a651931f34..0584cc7696 100644 --- a/deal.II/cmake/setup_finalize.cmake +++ b/deal.II/cmake/setup_finalize.cmake @@ -72,6 +72,17 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES}) ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_objects_${_build_lowercase} ) ENDFOREACH() +FILE(WRITE + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_source_includes + "" + ) + +# +# Cleanup deal.IITargets.cmake in the build directory: +# +FILE(REMOVE + ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}BuildTargets.cmake + ) ######################################################################## diff --git a/deal.II/cmake/setup_post_project_call.cmake b/deal.II/cmake/setup_post_project_call.cmake index 690acf5d5d..60aad894df 100644 --- a/deal.II/cmake/setup_post_project_call.cmake +++ b/deal.II/cmake/setup_post_project_call.cmake @@ -49,5 +49,10 @@ IF(CMAKE_CROSSCOMPILING) SET(DEAL_II_NATIVE "DEAL_II_NATIVE-NOTFOUND" CACHE FILEPATH "A pointer to a native deal.Ii build directory" ) - INCLUDE(${DEAL_II_NATIVE}/cmake/scripts/importExecutables.cmake) + IF(DEAL_II_NATIVE MATCHES "-NOTFOUND") + MESSAGE(FATAL_ERROR + "Please set the CMake variable DEAL_II_NATIVE to a valid path that points to a native deal.II build directory" + ) + ENDIF() + INCLUDE(${DEAL_II_NATIVE}/importExecutables.cmake) ENDIF() diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 008b42c4ad..89ca970443 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -85,6 +85,16 @@ inconvenience this causes.

Specific improvements

    +
  1. + Enhancement: It is now possible to use the build directory directly without + the need to install first. For this, a second copy of all necessary project + configuration files (deal.IIConfig.cmake, ..., Make.global_options) are + generated and deployed in the build directory. (This is fully compatible with + the old possibility to install into the build dir.) +
    + (Matthias Maier, 2013/09/15) +
  2. +
  3. Fixed: DoFTools::extract_locally_*_dofs now instantiated for hp::DofHandler.
    diff --git a/deal.II/source/CMakeLists.txt b/deal.II/source/CMakeLists.txt index 8842add21f..5b21083aac 100644 --- a/deal.II/source/CMakeLists.txt +++ b/deal.II/source/CMakeLists.txt @@ -82,6 +82,9 @@ FOREACH(build ${DEAL_II_BUILD_TYPES}) COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}" COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${build}}" INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}" + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" ) TARGET_LINK_LIBRARIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX} @@ -89,6 +92,14 @@ FOREACH(build ${DEAL_II_BUILD_TYPES}) ${DEAL_II_EXTERNAL_LIBRARIES} ) + FILE(MAKE_DIRECTORY + ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR} + ) + EXPORT(TARGETS ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX} + FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}BuildTargets.cmake + APPEND + ) + INSTALL(TARGETS ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX} EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets DESTINATION ${DEAL_II_LIBRARY_RELDIR} -- 2.39.5