# - Explain Components and Options...
# - Explain how to build and install only a specific component:
#
+# $ make <component>
# $ cmake -DCOMPONENT=<component> -P build/cmake_install.cmake
#
This feature adds a COMPONENT \"compat_files\" to the build system."
ON)
+OPTION(DEAL_II_INSTALL_PROJECT_CONFIG
+ "Enable the installation of a cmake project config. Useful for
+ autodetection ( FIND_PACKAGE(DEAL_II) ) of the deal.II library out of
+ cmake build systems.
+ This feature adds a COMPONENT \"project_config\" to the build system."
+ ON)
+
###########################################################################
# #
#
# We have to initialize some cached variables before PROJECT is called, so
-# go it at this point:
+# do it at this point:
#
INCLUDE(setup_cached_variables)
+
#
# Now, set the project and setup the rest:
#
INCLUDE(setup_compiler_flags)
-#
-# ####################
-# # FAT NOTE: #
-# ####################
+# ####################
+# # FAT NOTE: #
+# ####################
#
# To keep things clean, only the following cmake variables should be
# altered in the platform checks and features configuration
# (beside setting a lot of DEAL_II_* definitions...):
#
-# CMAKE_SHARED_LINKER_FLAGS
-# for setting necessary linker flags for the deal.II library.
+# For internal use:
+#
+# CMAKE_SHARED_LINKER_FLAGS
+# for setting necessary linker flags for the deal.II library.
+#
+# CMAKE_CXX_FLAGS (and CMAKE_C_FLAGS)
+# for setting necessary compiler flags, e.g. -std=c++11 (if
+# available).
#
-# CMAKE_C_FLAGS and CMAKE_CXX_FLAGS (<...>_RELEASE, <...>_DEBUG)
-# for setting necessary compiler flags, e.g. -std=c++11 (if available).
+ ADD_CUSTOM_TARGET(deal_ii_target_dependencies)
+# Used as a dummy target for all the stuff that has to be done
+# before the library can be compiled.
#
- ADD_CUSTOM_TARGET(deal_ii_target_dependencies)
-# Used as a dummy target for all the stuff that has to be done before the
-# library can be compiled.
#
- SET(deal_ii_external_libraries)
-# Used to keep track of external libraries, against which the deal.II
-# library (and user programs) will be linked.
+# For internal and external use:
+#
+ SET(deal_ii_external_libraries)
+# Used to keep track of external libraries, the deal.II library and
+# user programs have to be linked against.
+#
+#
+# For external use:
+#
+# CMAKE_EXTERNAL_INCLUDE_DIRS
+# Used to keep track of external include dirs, necessary for the
+# compilation of user programs.
#
# Feature configuration:
#
FILE(GLOB configure_files "contrib/cmake/configure/configure_*.cmake")
-
# Make sure the configure_*.cmake files are included in alphabetical order
# to fullfill some dependencies...
LIST(SORT configure_files)
-
FOREACH(file ${configure_files})
MESSAGE(STATUS "Include ${file}")
INCLUDE(${file})
#
# Build the toolchain and prepare the includes:
#
-ADD_SUBDIRECTORY(contrib/config)
ADD_SUBDIRECTORY(contrib/expand_instantiations)
ADD_SUBDIRECTORY(include)
+#
+# Compile and install the library:
+#
+ADD_SUBDIRECTORY(source)
+
#
# Prepare some directories for installation:
#
+ADD_SUBDIRECTORY(contrib/config) # has to be included after source
ADD_SUBDIRECTORY(doc)
-ADD_SUBDIRECTORY(scripts)
ADD_SUBDIRECTORY(examples)
+ADD_SUBDIRECTORY(scripts)
-#
-# Compile the library:
-#
-ADD_SUBDIRECTORY(source)
-
# Set up deal.II specific definitions
#
-SET(DEAL_II_PACKAGE_BUGREPORT "dealii@dealii.org")
SET(DEAL_II_PACKAGE_NAME "deal.II")
-SET(DEAL_II_PACKAGE_TARNAME ${DEAL_II_PACKAGE_NAME})
-
SET(DEAL_II_PACKAGE_VERSION ${VERSION})
SET(DEAL_II_PACKAGE_STRING
"${DEAL_II_PACKAGE_NAME} ${DEAL_II_PACKAGE_VERSION}"
)
-SET(DEAL_II_PACKAGE_URL "")
-
STRING(REGEX REPLACE
"^([0-9]+)\\..*" "\\1" DEAL_II_MAJOR "${VERSION}"
)
)
SET(DEAL_II_PATH ${CMAKE_INSTALL_PREFIX})
+
+SET(DEAL_II_PACKAGE_BUGREPORT "dealii@dealii.org")
+
+SET(DEAL_II_PACKAGE_TARNAME ${DEAL_II_PACKAGE_NAME}) #TODO
+
+SET(DEAL_II_PACKAGE_URL "http://www.dealii.org")
+
--- /dev/null
+#
+# The deal.II project configuration file
+#
+
+
+#
+# General information
+#
+
+SET(DEAL_II_VERSION "${DEAL_II_VERSION}")
+SET(DEAL_II_MAJOR "${DEAL_II_MAJOR}")
+SET(DEAL_II_MINOR "${DEAL_II_MINOR}")
+
+SET(DEAL_II_PATH "${CMAKE_INSTALL_PREFIX}")
+
+SET(DEAL_II_PACKAGE_NAME "${DEAL_II_PACKAGE_NAME}")
+SET(DEAL_II_PACKAGE_VERSION "${DEAL_II_PACKAGE_VERSION}")
+SET(DEAL_II_PACKAGE_STRING "${DEAL_II_PACKAGE_STRING}")
+
+SET(DEAL_II_PACKAGE_BUGREPORT "${DEAL_II_PACKAGE_BUGREPORT}")
+SET(DEAL_II_PACKAGE_TARNAME "${DEAL_II_PACKAGE_TARNAME}")
+SET(DEAL_II_PACKAGE_URL "${DEAL_II_PACKAGE_URL}")
+
+
+#
+# Compiler and linker configuration
+#
+
+SET(DEAL_II_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
+SET(DEAL_II_CXX_COMPILER_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}")
+
+SET(DEAL_II_C_COMPILER "${CMAKE_C_COMPILER}")
+SET(DEAL_II_C_COMPILER_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}}")
+
+SET(DEAL_II_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+
+SET(DEAL_II_LINKER ${CMAKE_LINKER})
+SET(DEAL_II_AR ${CMAKE_AR})
+
+
+#
+# Information on how to find and use the deal.II installation
+#
+
+SET(DEAL_II_INCLUDE_DIRS "${DEAL_II_CONFIG_INCLUDE_DIRS}")
+
+SET(DEAL_II_LIBRARIES "${DEAL_II_CONFIG_LIBRARIES}")
+
+
+#
+# External libraries we have to link against
+#
+
+SET(DEAL_II_EXTERNAL_LIBRARIES "${DEAL_II_EXTERNAL_LIBRARIES}")
+