# Set up deal.II specific definitions
#
+SET_IF_EMPTY(DEAL_II_PACKAGE_NAME "deal.II")
-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}"
)
+SET_IF_EMPTY(DEAL_II_PACKAGE_BUGREPORT "dealii@dealii.org")
+SET_IF_EMPTY(DEAL_II_PACKAGE_TARNAME ${DEAL_II_PACKAGE_NAME}) #TODO
+SET_IF_EMPTY(DEAL_II_PACKAGE_URL "http://www.dealii.org")
+
STRING(REGEX REPLACE
"^([0-9]+)\\..*" "\\1" DEAL_II_MAJOR "${VERSION}"
)
"^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_MINOR "${VERSION}"
)
+#
+# Set the library and project name depending on build type:
+#
+IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+ SET_IF_EMPTY(DEAL_II_BASE_NAME "deal_II.g")
+ SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_NAME "${DEAL_II_PACKAGE_NAME}_DEBUG")
+ELSE()
+ SET_IF_EMPTY(DEAL_II_BASE_NAME "deal_II")
+ SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_NAME "${DEAL_II_PACKAGE_NAME}")
+ENDIF()
SET(DEAL_II_PATH ${CMAKE_INSTALL_PREFIX})
# IF DEAL_II_COMPONENT_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_DOCUMENTATION_RELDIR "share/doc/${DEAL_II_PACKAGE_NAME}/html")
+ SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "share/doc/${DEAL_II_PACKAGE_NAME}/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/deal.II")
+ SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}")
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")
-
LIST(APPEND DEAL_II_INCLUDE_DIRS
"${CMAKE_INSTALL_PREFIX}/${DEAL_II_INCLUDE_RELDIR}"
)
-#
-# Set the library and project name depending on build type:
-#
-IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- SET(DEAL_II_BASE_NAME "deal_II.g")
- SET(DEAL_II_PROJECT_NAME "deal.II_DEBUG")
-ELSE()
- SET(DEAL_II_BASE_NAME "deal_II")
- SET(DEAL_II_PROJECT_NAME "deal.II")
-ENDIF()
-
#
# The library name:
#
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_NAME}Config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
)
GET_CMAKE_PROPERTY(res VARIABLES)
FOREACH(var ${res})
IF(var MATCHES "DEAL_II_WITH")
- FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_NAME}Config.cmake
+ FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
"SET(${var} ${${var}})\n"
)
ENDIF()
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/ConfigVersion.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_NAME}ConfigVersion.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake
@ONLY
)
INSTALL(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_NAME}Config.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_NAME}ConfigVersion.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}ConfigVersion.cmake
DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
COMPONENT project_config
)
# General information
#
-SET(DEAL_II_PROJECT_NAME "${DEAL_II_PROJECT_NAME}")
+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_VERSION "${DEAL_II_MAJOR}.${DEAL_II_MINOR}")
SET(DEAL_II_MAJOR "${DEAL_II_MAJOR}")
SET(DEAL_II_MINOR "${DEAL_II_MINOR}")
-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}")
+SET(DEAL_II_PROJECT_CONFIG_NAME "${DEAL_II_PROJECT_NAME}")
+
+
#
# Information about the project location
#