)
#
-# TODO: This is decoupled from the actual library target atm...
+# The base name:
#
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
- SET(DEAL_II_LIBRARY_NAME "deal_II.g")
+ SET(DEAL_II_BASE_NAME "deal_II.g")
ELSE()
- SET(DEAL_II_LIBRARY_NAME "deal_II")
+ SET(DEAL_II_BASE_NAME "deal_II")
ENDIF()
+
+#
+# The library name:
+#
IF(BUILD_SHARED_LIBS)
SET(DEAL_II_LIBRARY_NAME
- ${CMAKE_SHARED_LIBRARY_PREFIX}deal_II${CMAKE_SHARED_LIBRARY_SUFFIX}
+ ${CMAKE_SHARED_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
)
ELSE()
SET(DEAL_II_LIBRARY_NAME
- ${CMAKE_STATIC_LIBRARY_PREFIX}deal_II${CMAKE_STATIC_LIBRARY_SUFFIX}
+ ${CMAKE_STATIC_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
)
ENDIF()
#
CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/deal.IIConfig.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfig.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_BASE_NAME}Config.cmake
)
GET_CMAKE_PROPERTY(res VARIABLES)
FOREACH(var ${res})
IF(var MATCHES "DEAL_II_WITH")
- FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfig.cmake
+ FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_BASE_NAME}Config.cmake
"SET(${var} ${${var}})\n"
)
ENDIF()
ENDFOREACH()
CONFIGURE_FILE(
- ${CMAKE_CURRENT_SOURCE_DIR}/deal.IIConfigVersion.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfigVersion.cmake
+ ${CMAKE_CURRENT_SOURCE_DIR}/ConfigVersion.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_BASE_NAME}ConfigVersion.cmake
@ONLY
)
INSTALL(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfig.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/deal.IIConfigVersion.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_BASE_NAME}Config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_BASE_NAME}ConfigVersion.cmake
DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
COMPONENT project_config
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/Make.global_options.in
- ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
+ ${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
${CMAKE_CURRENT_BINARY_DIR}/Version
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
# No point to wrack one's brain over the question whether a new version of
# a C++ library is still ABI backwards compatible :-]
#
-SET_TARGET_PROPERTIES(deal_II PROPERTIES
+SET_TARGET_PROPERTIES(${DEAL_II_BASE_NAME} PROPERTIES
VERSION ${VERSION}
SOVERSION ${VERSION}
- DEBUG_POSTFIX ".g"
)
SET_TARGET_PROPERTIES(deal_II PROPERTIES