+++ /dev/null
-#
-# GNUmakefile has priority over Makefile for GNU Make.
-# So if a Makefile was generated by CMake due to an in-source configure
-# chain-load it:
-#
-ifneq ($(wildcard Makefile),)
- include Makefile
-else
- default:
-endif
-
-steps:= $(wildcard step-*)
-
-%/Makefile:
- -cd $(@D) && cmake . > configure.log 2>&1
-
-.PHONY: configure_examples
-configure_examples: $(steps:%=%/Makefile)
-
-%/%: %/Makefile
- cd $(@D) && if [ -f Makefile ]; then (make > build.log 2>&1); fi
-
-.PHONY: build_examples
-build_examples: $(steps:%=%/%)
-
-%/OK: %/%
- cd $(@D) && if [ -f Makefile ]; then (make run > run.log 2>&1); fi && touch OK
-
-.PHONY: run_examples
-run_examples: $(steps:%=%/OK)
-
--- /dev/null
+#####
+##
+## Copyright (C) 2012, 2013 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>
+##
+#####
+
+#
+# Compile the deal.II library
+#
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_BINARY_DIR}/include/
+ ${CMAKE_SOURCE_DIR}/include/
+ )
+
+#
+# List the directories where we have source files. the ones with the longest
+# compile jobs come first so that 'make -j N' saturates many processors also
+# towards the end of compiling rather than having to wait for one long
+# compilation that, because it has been listed last, is started towards the
+# end of everything (e.g. numerics/vectors.cc takes several minutes to
+# compile...)
+#
+ADD_SUBDIRECTORY(numerics)
+ADD_SUBDIRECTORY(fe)
+ADD_SUBDIRECTORY(dofs)
+ADD_SUBDIRECTORY(lac)
+ADD_SUBDIRECTORY(base)
+ADD_SUBDIRECTORY(grid)
+ADD_SUBDIRECTORY(hp)
+ADD_SUBDIRECTORY(multigrid)
+ADD_SUBDIRECTORY(distributed)
+
+
+FOREACH(build ${DEAL_II_BUILD_TYPES})
+ STRING(TOLOWER ${build} build_lowercase)
+
+ #
+ # Combine all ${build} OBJECT targets to a ${build} library:
+ #
+ FILE(STRINGS
+ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/deal_ii_objects_${build_lowercase}
+ deal_ii_objects_${build_lowercase}
+ )
+ ADD_LIBRARY(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ ${deal_ii_objects_${build_lowercase}}
+ )
+
+ SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ PROPERTIES
+ VERSION ${VERSION}
+ #
+ # Sonaming: Well... we just use the version number.
+ # No point to wrack one's brain over the question whether a new version of
+ # a C++ library is still ABI backwards compatible :-]
+ #
+ SOVERSION ${VERSION}
+ LINK_FLAGS "${DEAL_II_SHARED_LINKER_FLAGS_${build}}"
+ COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}"
+ COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${build}}"
+ )
+
+ TARGET_LINK_LIBRARIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ ${DEAL_II_EXTERNAL_LIBRARIES}
+ ${DEAL_II_EXTERNAL_LIBRARIES_${build}}
+ )
+
+ INSTALL(TARGETS ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
+ DESTINATION ${DEAL_II_LIBRARY_RELDIR}
+ COMPONENT library
+ )
+
+ #
+ # Information for legacy Make.global_options
+ #
+ GET_TARGET_PROPERTY(lib ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX} LOCATION)
+ GET_FILENAME_COMPONENT(lib "${lib}" NAME)
+ SET(MAKEFILE_LIBRARY_${build} "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}/${lib}" PARENT_SCOPE)
+
+ENDFOREACH()
+
+INSTALL(EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
+ DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
+ COMPONENT library
+ )