#
# Build the toolchain and prepare the includes:
#
-ADD_SUBDIRECTORY(config)
+INCLUDE(config/setup_template-arguments.in.cmake)
ADD_SUBDIRECTORY(scripts)
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(source)
#
-# Prepare some directories for installation
+# Prepare the remaining directories for installation
#
+ADD_SUBDIRECTORY(config)
IF(DEAL_II_WITH_DOC_DIRECTORY)
ADD_SUBDIRECTORY(doc)
ENDIF()
ADD_SUBDIRECTORY(examples)
ADD_SUBDIRECTORY(contrib)
-IF(DEAL_II_COMPONENT_COMPAT_FILES)
- INCLUDE(config/setup_make.global_options.cmake)
-ENDIF()
#
#####
-CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/template-arguments.in
- ${CMAKE_CURRENT_BINARY_DIR}/template-arguments
- )
-
-
###########################################################################
# #
# Setup and install the convenience macros: #
# #
###########################################################################
+
+FOREACH(build ${DEAL_II_BUILD_TYPES})
+ SET(CONFIG_LIBRARIES_${build}
+ ${MAKEFILE_LIBRARY_${build}}
+ ${DEAL_II_EXTERNAL_LIBRARIES}
+ ${DEAL_II_EXTERNAL_LIBRARIES_${build}}
+ )
+ IF(NOT "${CONFIG_LIBRARIES_${build}}" STREQUAL "")
+ IF(build MATCHES DEBUG)
+ SET(keyword "debug")
+ ELSE()
+ SET(keyword "optmized")
+ ENDIF()
+ LIST(APPEND CONFIG_LIBRARIES
+ ${keyword}
+ ${CONFIG_LIBRARIES_${build}}
+ )
+ ENDIF()
+ENDFOREACH()
+
+
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
COMPONENT library
)
+
+###########################################################################
+# #
+# Configure and install the old Makefile configuration: #
+# #
+###########################################################################
+
+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_C}"
+ ${DEAL_II_USER_INCLUDE_DIRS}
+ ${DEAL_II_INCLUDE_DIRS}
+ )
+
+ FOREACH(build ${DEAL_II_BUILD_TYPES})
+ TO_STRING_AND_ADD_PREFIX(MAKEFILE_DEFINITIONS_${build}
+ "-D"
+ ${DEAL_II_USER_DEFINITIONS}
+ ${DEAL_II_USER_DEFINITIONS_${build}}
+ )
+
+ #
+ # Add an rpath directive in front of each library, so that libraries
+ # outside of the default search directories will be found by the runtime
+ # dynamic linker:
+ #
+ FOREACH(lib
+ ${MAKEFILE_LIBRARY_${build}}
+ ${DEAL_II_EXTERNAL_LIBRARIES}
+ ${DEAL_II_EXTERNAL_LIBRARIES_${build}}
+ )
+ GET_FILENAME_COMPONENT(path ${lib} PATH)
+ LIST(APPEND MAKEFILE_LIBS_${build} "-Wl,-rpath -Wl,${path}")
+ LIST(APPEND MAKEFILE_LIBS_${build} ${lib})
+ ENDFOREACH()
+ TO_STRING(MAKEFILE_LIBS_${build} ${MAKEFILE_LIBS_${build}})
+ #
+ # Put our linker flags directly in front of this string:
+ #
+ SET(MAKEFILE_LIBS_${build}
+ "${CMAKE_SHARED_LINKER_FLAGS} ${DEAL_II_SHARED_LINKER_FLAGS_${build}} ${MAKEFILE_LIBS_${build}}"
+ )
+ ENDFOREACH()
+
+ #
+ # Boilerplate: The Make.global_options expects variables to be set to
+ # yes, as is common for Makefiles.
+ #
+ COND_SET_TO_YES(DEAL_II_WITH_TBB MAKEFILE_enablethreads)
+ COND_SET_TO_YES(DEAL_II_WITH_FUNCTIONPARSER MAKEFILE_enableparser)
+ COND_SET_TO_YES(BUILD_SHARED_LIBS MAKEFILE_enableshared)
+
+ COND_SET_TO_YES(DEAL_II_WITH_PETSC MAKEFILE_PETSC)
+ COND_SET_TO_YES(DEAL_II_USE_PETSC_DEV MAKEFILE_PETSC_DEV)
+ COND_SET_TO_YES(DEAL_II_WITH_TRILINOS MAKEFILE_TRILINOS)
+ COND_SET_TO_YES(DEAL_II_WITH_BLAS MAKEFILE_BLAS)
+ COND_SET_TO_YES(DEAL_II_WITH_LAPACK MAKEFILE_LAPACK)
+ COND_SET_TO_YES(DEAL_II_WITH_ARPACK MAKEFILE_ARPACK)
+ COND_SET_TO_YES(DEAL_II_WITH_METIS MAKEFILE_METIS)
+ COND_SET_TO_YES(DEAL_II_WITH_UMFPACK MAKEFILE_UMFPACK)
+ COND_SET_TO_YES(DEAL_II_WITH_P4EST MAKEFILE_P4EST)
+ COND_SET_TO_YES(DEAL_II_WITH_MPI MAKEFILE_MPI)
+
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
+ )
+
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/Version.in
+ ${CMAKE_CURRENT_BINARY_DIR}/Version
+ )
+
+ INSTALL(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/template-arguments
+ ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
+ DESTINATION common
+ COMPONENT compat_files
+ )
+
+ INSTALL(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/Version
+ DESTINATION ${CMAKE_INSTALL_PREFIX}
+ COMPONENT compat_files
+ )
+ENDIF()
+
#
-# Information about include directories
+# Information about include directories and libraries
#
-# Include directories of the deal.II library
SET(DEAL_II_INCLUDE_DIRS "@DEAL_II_INCLUDE_DIRS@")
-# External include directories
-SET(DEAL_II_EXTERNAL_INCLUDE_DIRS "@DEAL_II_USER_INCLUDE_DIRS@")
+# Full list of libraries for the debug target:
+SET(DEAL_II_LIBRARIES_DEBUG "@CONFIG_LIBRARIES_DEBUG@")
+
+# Full lis of libraries for the release target:
+SET(DEAL_II_LIBRARIES_RELEASE "@CONFIG_LIBRARIES_RELEASE@")
+
+# Full list of libraries with "debug" and "optimized" keywords for easy use with TARGET_LINK_LIBRARIES:
+SET(DEAL_II_LIBRARIES "@CONFIG_LIBRARIES@")
#
+++ /dev/null
-#####
-##
-## Copyright (C) 2012 by the deal.II authors
-##
-## This file is part of the deal.II library.
-##
-## <TODO: Full License information>
-## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
-## version of the LGPL license.
-##
-## Author: Matthias Maier <matthias.maier@iwr.uni-heidelberg.de>
-##
-#####
-
-
-###########################################################################
-# #
-# Configure and install the old Makefile configuration: #
-# #
-###########################################################################
-
-#
-# 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_C}"
- ${DEAL_II_USER_INCLUDE_DIRS}
- ${DEAL_II_INCLUDE_DIRS}
- )
-
-FOREACH(build ${DEAL_II_BUILD_TYPES})
- TO_STRING_AND_ADD_PREFIX(MAKEFILE_DEFINITIONS_${build}
- "-D"
- ${DEAL_II_USER_DEFINITIONS}
- ${DEAL_II_USER_DEFINITIONS_${build}}
- )
-
- #
- # Add an rpath directive in front of each library, so that libraries
- # outside of the default search directories will be found by the runtime
- # dynamic linker:
- #
- FOREACH(lib
- ${MAKEFILE_LIBRARY_${build}}
- ${DEAL_II_EXTERNAL_LIBRARIES}
- ${DEAL_II_EXTERNAL_LIBRARIES_${build}}
- )
- GET_FILENAME_COMPONENT(path ${lib} PATH)
- LIST(APPEND MAKEFILE_LIBS_${build} "-Wl,-rpath -Wl,${path}")
- LIST(APPEND MAKEFILE_LIBS_${build} ${lib})
- ENDFOREACH()
- TO_STRING(MAKEFILE_LIBS_${build} ${MAKEFILE_LIBS_${build}})
- #
- # Put our linker flags directly in front of this string:
- #
- SET(MAKEFILE_LIBS_${build}
- "${CMAKE_SHARED_LINKER_FLAGS} ${DEAL_II_SHARED_LINKER_FLAGS_${build}} ${MAKEFILE_LIBS_${build}}"
- )
-ENDFOREACH()
-
-#
-# Boilerplate: The Make.global_options expects variables to be set to
-# yes, as is common for Makefiles.
-#
-COND_SET_TO_YES(DEAL_II_WITH_TBB MAKEFILE_enablethreads)
-COND_SET_TO_YES(DEAL_II_WITH_FUNCTIONPARSER MAKEFILE_enableparser)
-COND_SET_TO_YES(BUILD_SHARED_LIBS MAKEFILE_enableshared)
-
-COND_SET_TO_YES(DEAL_II_WITH_PETSC MAKEFILE_PETSC)
-COND_SET_TO_YES(DEAL_II_USE_PETSC_DEV MAKEFILE_PETSC_DEV)
-COND_SET_TO_YES(DEAL_II_WITH_TRILINOS MAKEFILE_TRILINOS)
-COND_SET_TO_YES(DEAL_II_WITH_BLAS MAKEFILE_BLAS)
-COND_SET_TO_YES(DEAL_II_WITH_LAPACK MAKEFILE_LAPACK)
-COND_SET_TO_YES(DEAL_II_WITH_ARPACK MAKEFILE_ARPACK)
-COND_SET_TO_YES(DEAL_II_WITH_METIS MAKEFILE_METIS)
-COND_SET_TO_YES(DEAL_II_WITH_UMFPACK MAKEFILE_UMFPACK)
-COND_SET_TO_YES(DEAL_II_WITH_P4EST MAKEFILE_P4EST)
-COND_SET_TO_YES(DEAL_II_WITH_MPI MAKEFILE_MPI)
-
-CONFIGURE_FILE(
- ${CMAKE_SOURCE_DIR}/config/Make.global_options.in
- ${CMAKE_BINARY_DIR}/config/Make.global_options
- )
-
-CONFIGURE_FILE(
- ${CMAKE_SOURCE_DIR}/config/Version.in
- ${CMAKE_BINARY_DIR}/config/Version
- )
-
-INSTALL(FILES
- ${CMAKE_BINARY_DIR}/config/template-arguments
- ${CMAKE_BINARY_DIR}/config/Make.global_options
- DESTINATION common
- COMPONENT compat_files
- )
-
-INSTALL(FILES
- ${CMAKE_BINARY_DIR}/config/Version
- DESTINATION ${CMAKE_INSTALL_PREFIX}
- COMPONENT compat_files
- )
-
--- /dev/null
+#####
+##
+## Copyright (C) 2012 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## <TODO: Full License information>
+## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
+## version of the LGPL license.
+##
+## Author: Matthias Maier <matthias.maier@iwr.uni-heidelberg.de>
+##
+#####
+
+
+CONFIGURE_FILE(
+ ${CMAKE_SOURCE_DIR}/config/template-arguments.in
+ ${CMAKE_BINARY_DIR}/config/template-arguments
+ )
+