###########################################################################
# #
-# Compile the library: #
+# Compile and install the library: #
# #
###########################################################################
#
# Build the toolchain and prepare the includes:
#
-
ADD_SUBDIRECTORY(contrib/config)
ADD_SUBDIRECTORY(contrib/expand_instantiations)
ADD_SUBDIRECTORY(include)
+
#
-# Compile the library:
+# Prepare the examples:
#
+ADD_SUBDIRECTORY(examples)
+
+#
+# Compile the library:
+#
ADD_SUBDIRECTORY(source)
--- /dev/null
+#
+# Generate the documentation via doxygen:
+#
+
+
+# TODO
+
+
+#
+# Add a rule on how to install the examples:
+#
+
+SET(deal_ii_examples
+ step-1
+ step-2
+ step-3
+ step-4
+ step-5
+ step-6
+ step-7
+ step-8
+ step-9
+ step-10
+ step-11
+ step-12
+ step-13
+ step-14
+ step-15
+ step-16
+ step-17
+ step-18
+ step-19
+ step-20
+ step-21
+ step-22
+ step-23
+ step-24
+ step-25
+ step-26
+ step-27
+ step-28
+ step-29
+ step-30
+ step-31
+ step-32
+ step-33
+ step-34
+ step-35
+ step-36
+ step-37
+ step-38
+ step-39
+ step-40
+ step-41
+ step-42
+ step-43
+ step-44
+ step-45
+ step-46
+ step-47
+ step-48
+ )
+
+FOREACH(step ${deal_ii_examples})
+ INSTALL(DIRECTORY ${step}
+ DESTINATION usr/share/doc/deal.II/examples
+ COMPONENT examples
+ PATTERN "doc" EXCLUDE
+ )
+ENDFOREACH()
+#
+# Configure config.h
+#
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/deal.II/base/config.h.in
${CMAKE_CURRENT_BINARY_DIR}/deal.II/base/config.h
)
+
#
#TODO: This perl script has to die...:
#
ADD_DEPENDENCIES(deal_ii_target_dependencies lapack_templates)
+
+#
+# Add a rule on how to install the header files:
+#
+
+INSTALL(DIRECTORY deal.II
+ DESTINATION include
+ COMPONENT library
+ FILES_MATCHING PATTERN "*.h"
+ )
+
+#
+# and don't forget to install all generated header files, too:
+#
+INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/deal.II
+ DESTINATION include
+ COMPONENT library
+ FILES_MATCHING PATTERN "*.h"
+ )
# Compile the deal.II library
#
-
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include/
${CMAKE_BINARY_DIR}/include/
)
-
#
# Each subdirectory specifies an OBJECT target:
#
ADD_SUBDIRECTORY(multigrid)
ADD_SUBDIRECTORY(numerics)
-
-ADD_LIBRARY(deal_II #whether SHARED or STATIC is set by BUILD_SHARED_LIBS#
+#
+# Combine all OBJECT targets to a library:
+#
+ADD_LIBRARY(deal_II
$<TARGET_OBJECTS:obj_base>
$<TARGET_OBJECTS:obj_distributed>
$<TARGET_OBJECTS:obj_dofs>
)
TARGET_LINK_LIBRARIES(deal_II ${deal_ii_external_libraries})
+
+
+#
+# Finally, add a rule how to install the library:
+#
+INSTALL(TARGETS deal_II
+ LIBRARY
+ DESTINATION lib${LIB_SUFFIX}
+ COMPONENT library
+ )