"^[0-9]+\\.([0-9]+).*" "\\1" DEAL_II_VERSION_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_PROJECT_CONFIG_NAME "${DEAL_II_PACKAGE_NAME}")
+
+SET_IF_EMPTY(DEAL_II_BASE_NAME "deal_II")
+
+SET_IF_EMPTY(DEAL_II_DEBUG_SUFFIX ".g")
SET(DEAL_II_PATH ${CMAKE_INSTALL_PREFIX})
SET_IF_EMPTY(DEAL_II_PROJECT_CONFIG_RELDIR "${DEAL_II_LIBRARY_RELDIR}/cmake/${DEAL_II_PROJECT_CONFIG_NAME}")
ENDIF()
+
LIST(APPEND DEAL_II_INCLUDE_DIRS
"${CMAKE_INSTALL_PREFIX}/${DEAL_II_INCLUDE_RELDIR}"
)
+
#
# The library name:
#
+
IF(BUILD_SHARED_LIBS)
- SET(DEAL_II_LIBRARY_NAME
- ${CMAKE_SHARED_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
- )
+ SET(DEAL_II_LIBRARY_NAME_RELEASE ${CMAKE_SHARED_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX} )
+ SET(DEAL_II_LIBRARY_NAME_DEBUG ${CMAKE_SHARED_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${DEAL_II_DEBUG_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX} )
ELSE()
- SET(DEAL_II_LIBRARY_NAME
- ${CMAKE_STATIC_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
- )
+ SET(DEAL_II_LIBRARY_NAME_RELEASE ${CMAKE_STATIC_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX} )
+ SET(DEAL_II_LIBRARY_NAME_DEBUG ${CMAKE_STATIC_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${DEAL_II_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX} )
ENDIF()
+LIST(APPEND DEAL_II_LIBRARIES_DEBUG
+ "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}/${DEAL_II_LIBRARY_NAME_DEBUG}"
+ )
+LIST(APPEND DEAL_II_LIBRARIES_RELEASE
+ "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}/${DEAL_II_LIBRARY_NAME_RELEASE}"
+ )
+
LIST(APPEND DEAL_II_LIBRARIES
- "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}/${DEAL_II_LIBRARY_NAME}"
+ DEBUG
+ "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}/${DEAL_II_LIBRARY_NAME_DEBUG}"
+ RELEASE
+ "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}/${DEAL_II_LIBRARY_NAME_RELEASE}"
)
)
#
- # Add an rpath directive inf front of each library, so that libraries
+ # Add an rpath directive in front of each library, so that libraries
# outside of the default search directories will be found by the runtime
# dynamic linker:
#
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in
- ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options.${CMAKE_BUILD_TYPE}
- )
-
- CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.stub
${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
- COPYONLY)
+ )
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/Version.in
INSTALL(FILES
${CMAKE_CURRENT_BINARY_DIR}/template-arguments
- ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options.${CMAKE_BUILD_TYPE}
${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
DESTINATION common
COMPONENT compat_files
SET(DEAL_II_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
SET(DEAL_II_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
-SET(DEAL_II_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}")
+SET(DEAL_II_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+SET(DEAL_II_CXX_FLAGS_DEBUG "${DEAL_II_CXX_FLAGS_DEBUG}")
+SET(DEAL_II_CXX_FLAGS_RELEASE "${DEAL_II_CXX_FLAGS_RELEASE}")
SET(DEAL_II_C_COMPILER "${CMAKE_C_COMPILER}")
-SET(DEAL_II_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}}")
+SET(DEAL_II_C_FLAGS "${CMAKE_C_FLAGS}")
+SET(DEAL_II_C_FLAGS_DEBUG "${DEAL_II_C_FLAGS_DEBUG}")
+SET(DEAL_II_C_FLAGS_RELEASE "${DEAL_II_C_FLAGS_RELEASE}")
SET(DEAL_II_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+SET(DEAL_II_LINKER_FLAGS_DEBUG "${DEAL_II_SHARED_LINKER_FLAGS_DEBUG}")
+SET(DEAL_II_LINKER_FLAGS_RELEASE "${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}")
SET(DEAL_II_LINKER "${CMAKE_LINKER}")
SET(DEAL_II_AR "${CMAKE_AR}")
#
-# Information on where to find the deal.II library and headers
+# Information on where to find the deal.II libraries and headers
#
SET(DEAL_II_INCLUDE_DIRS "${DEAL_II_INCLUDE_DIRS}")
-
SET(DEAL_II_LIBRARIES "${DEAL_II_LIBRARIES}")
+SET(DEAL_II_LIBRARIES_DEBUG "${DEAL_II_LIBRARIES_DEBUG}")
+SET(DEAL_II_LIBRARIES_RELEASE "${DEAL_II_LIBRARIES_RELEASE}")
#
# External libraries we have to link against
#
-SET(DEAL_II_EXTERNAL_INCLUDE_DIRS "${DEAL_II_EXTERNAL_INCLUDE_DIRS}")
+SET(DEAL_II_EXTERNAL_INCLUDE_DIRS "${DEAL_II_USER_INCLUDE_DIRS}")
SET(DEAL_II_EXTERNAL_LIBRARIES "${DEAL_II_EXTERNAL_LIBRARIES}")
+SET(DEAL_II_EXTERNAL_LIBRARIES_DEBUG "${DEAL_II_EXTERNAL_LIBRARIES_DEBUG}")
+SET(DEAL_II_EXTERNAL_LIBRARIES_RELEASE "${DEAL_II_EXTERNAL_LIBRARIES_RELEASE}")
-SET(DEAL_II_EXTERNAL_DEFINITIONS "${DEAL_II_EXTERNAL_DEFINITIONS}")
+SET(DEAL_II_EXTERNAL_DEFINITIONS "${DEAL_II_USER_DEFINITIONS}")
+SET(DEAL_II_EXTERNAL_DEFINITIONS_DEBUG "${DEAL_II_USER_DEFINITIONS_DEBUG}")
+SET(DEAL_II_EXTERNAL_DEFINITIONS_RELEASE "${DEAL_II_USER_DEFINITIONS_RELEASE}")
#