# DEAL_II_VERSION
#
# Information about paths, install locations and names:
+
+# DEAL_II_NAMESPACE *)
#
# DEAL_II_PROJECT_CONFIG_NAME *)
# DEAL_II_BASE_NAME *)
# #
########################################################################
-set(DEAL_II_PROJECT_CONFIG_NAME "${DEAL_II_PACKAGE_NAME}")
+string(REPLACE "." "" _namespace "${DEAL_II_PACKAGE_NAME}")
+string(TOLOWER "${_namespace}" _namespace)
+set_if_empty(DEAL_II_NAMESPACE "${_namespace}")
+
+set_if_empty(DEAL_II_PROJECT_CONFIG_NAME "${DEAL_II_PACKAGE_NAME}")
string(REPLACE "." "_" _base_name "${DEAL_II_PACKAGE_NAME}")
set_if_empty(DEAL_II_BASE_NAME "${_base_name}")
get_property(_objects GLOBAL PROPERTY DEAL_II_OBJECTS_${build})
- add_library(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ add_library(${DEAL_II_NAMESPACE}_${build_lowercase}
dummy.cc # Workaround for a bug in the Xcode generator
${_objects}
)
- add_dependencies(library ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX})
+ add_dependencies(library ${DEAL_II_NAMESPACE}_${build_lowercase})
- set_target_properties(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ set_target_properties(${DEAL_II_NAMESPACE}_${build_lowercase}
PROPERTIES
VERSION "${DEAL_II_PACKAGE_VERSION}"
#
LINKER_LANGUAGE "CXX"
COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${build}}"
COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${build}}"
+ ARCHIVE_OUTPUT_NAME "${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}"
+ LIBRARY_OUTPUT_NAME "${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}"
+ RUNTIME_OUTPUT_NAME "${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}"
)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
- set_target_properties(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ set_target_properties(${DEAL_II_NAMESPACE}_${build_lowercase}
PROPERTIES
MACOSX_RPATH OFF
BUILD_WITH_INSTALL_RPATH OFF
# lib locations for _DEBUG (no support for dynamic linking, _RELEASE will be
# ignored), but we do it anyhow.
if (DEAL_II_MSVC)
- set_target_properties(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ set_target_properties(${DEAL_II_NAMESPACE}_${build_lowercase}
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
endif()
- target_link_libraries(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ target_link_libraries(${DEAL_II_NAMESPACE}_${build_lowercase}
${DEAL_II_LIBRARIES_${build}}
${DEAL_II_LIBRARIES}
)
file(MAKE_DIRECTORY
${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}
)
- export(TARGETS ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ export(TARGETS ${DEAL_II_NAMESPACE}_${build_lowercase}
+ NAMESPACE "${DEAL_II_NAMESPACE}::"
FILE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake
APPEND
)
- install(TARGETS ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
+ install(TARGETS ${DEAL_II_NAMESPACE}_${build_lowercase}
COMPONENT library
EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
endforeach()
install(EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
+ NAMESPACE "${DEAL_II_NAMESPACE}::"
DESTINATION ${DEAL_II_PROJECT_CONFIG_RELDIR}
COMPONENT library
)