--- /dev/null
+
+MACRO(SET_IF_EMPTY variable value)
+ IF(NOT ${${variable}} STREQUAL "")
+ SET(${variable} ${value})
+ENDMACRO()
+
SET(DEAL_II_PACKAGE_NAME "deal.II")
-
SET(DEAL_II_PACKAGE_VERSION ${VERSION})
-
SET(DEAL_II_PACKAGE_STRING
"${DEAL_II_PACKAGE_NAME} ${DEAL_II_PACKAGE_VERSION}"
)
"^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_MINOR "${VERSION}"
)
+
SET(DEAL_II_PATH ${CMAKE_INSTALL_PREFIX})
-SET(DEAL_II_PACKAGE_BUGREPORT "dealii@dealii.org")
+IF(DEAL_II_INSTALL_COMPAT_FILES)
+ #
+ # The good, old directory structure:
+ #
+ SET(DEAL_II_DOCUMENTATION_RELDIR "doc")
+ SET(DEAL_II_EXAMPLES_RELDIR "examples")
+ SET(DEAL_II_INCLUDE_RELDIR "include")
+ SET(DEAL_II_LIBRARY_RELDIR "lib")
+ SET(DEAL_II_PROJECT_CONFIG_RELDIR "lib/cmake")
+
+ELSE()
+ #
+ # IF DEAL_II_INSTALL_COMPAT_FILES is not set, we assume that we have to
+ # obey the FSHS...
+ #
+ SET_IF_EMPTY(DEAL_II_DOCUMENTATION_RELDIR "share/doc/deal.II/html")
+ SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "share/doc/deal.II/examples")
+ SET_IF_EMPTY(DEAL_II_INCLUDE_RELDIR "include")
+ SET_IF_EMPTY(DEAL_II_LIBRARY_RELDIR "lib${LIB_SUFFIX}")
+ SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake")
+ENDIF()
+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")
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_TARNAME "${DEAL_II_PACKAGE_TARNAME}")
SET(DEAL_II_PACKAGE_URL "${DEAL_II_PACKAGE_URL}")
+#
+# Information about the project location
+#
+
+SET(DEAL_II_PATH "${DEAL_II_PATH}")
+SET(DEAL_II_DOCUMENTATION_RELDIR "${DEAL_II_DOCUMENTATION_RELDIR}")
+SET(DEAL_II_EXAMPLES_RELDIR "${DEAL_II_EXAMPLES_RELDIR}")
+SET(DEAL_II_INCLUDE_RELDIR "${DEAL_II_INCLUDE_RELDIR}")
+SET(DEAL_II_LIBRARY_RELDIR "${DEAL_II_LIBRARY_RELDIR}")
+SET(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_PROJECT_CONFIG_RELDIR}")
+
#
# Compiler and linker configuration
#
+SET(DEAL_II_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
+
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_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
-SET(DEAL_II_LINKER ${CMAKE_LINKER})
-SET(DEAL_II_AR ${CMAKE_AR})
+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_INCLUDE_DIRS "${DEAL_II_INCLUDE_DIRS}")
-SET(DEAL_II_LIBRARIES "${DEAL_II_CONFIG_LIBRARIES}")
+SET(DEAL_II_LIBRARIES "${DEAL_II_LIBRARIES}")
#
# External libraries we have to link against
#
+SET(DEAL_II_EXTERNAL_INCLUDE_DIRS "${DEAL_II_EXTERNAL_INCLUDE_DIRS}")
+
SET(DEAL_II_EXTERNAL_LIBRARIES "${DEAL_II_EXTERNAL_LIBRARIES}")
+
-IF(DEAL_II_WITH_DOXYGEN)
- #
- # Generate the documentation via doxygen:
- #
-
- # TODO
-
-ENDIF(DEAL_II_WITH_DOXYGEN)
-
-
IF(DEAL_II_INSTALL_EXAMPLES)
#
step-42 step-43 step-44 step-45 step-46 step-47 step-48
)
-
- IF(DEAL_II_INSTALL_COMPAT_FILES)
- #
- # The good, old directory where examples get installed to:
- #
- SET(DEAL_II_EXAMPLES_RELDIR "examples")
- ELSE()
- #
- # IF DEAL_II_INSTALL_COMPAT_FILES is not set, we assume that we have to
- # obey the file system standard, so install to usr/share/doc/deal.II.
- # (A path expected by the majority of distributions, but a bit
- # inconvenient...)
- #
- SET(DEAL_II_EXAMPLES_RELDIR "usr/share/doc/deal.II/examples")
- ENDIF()
-
FOREACH(step ${deal_ii_examples})
INSTALL(DIRECTORY ${step}
DESTINATION ${DEAL_II_EXAMPLES_RELDIR}
#
INSTALL(DIRECTORY deal.II
- DESTINATION include
+ DESTINATION ${DEAL_II_INCLUDE_RELDIR}
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
+ DESTINATION ${DEAL_II_INCLUDE_RELDIR}
COMPONENT library
FILES_MATCHING PATTERN "*.h"
)
#
INSTALL(TARGETS deal_II
LIBRARY
- DESTINATION lib${LIB_SUFFIX}
+ DESTINATION ${DEAL_II_LIBRARY_RELDIR}
COMPONENT library
)