]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Restructure library name creation and remove obsolete include
authorMatthias Maier <tamiko@kyomu.43-1.org>
Mon, 12 Jan 2015 17:44:21 +0000 (18:44 +0100)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 18 Jan 2015 19:07:56 +0000 (20:07 +0100)
cmake/config/CMakeLists.txt
cmake/config/Make.global_options.in [new file with mode: 0644]

index 03e544b6b7849fdfe25e29b16276e9a146171081..0277d0b60565a6c704668e4e0517cf57982ffe29 100644 (file)
@@ -21,7 +21,7 @@
 #
 # We support two configurations out of which deal.II can be used - directly
 # from the build directory or after installation. So we have to prepare
-# two distinct set ups.
+# two distinct setups.
 #
 
 MESSAGE(STATUS "Setting up project configuration")
@@ -93,44 +93,30 @@ FOREACH(_build ${DEAL_II_BUILD_TYPES})
   ENDIF()
 
   #
-  # Build up library name depending on link type:
+  # Build up library name depending on link type and platform:
   #
+
   IF(BUILD_SHARED_LIBS)
-    SET(CONFIG_LIBRARY_${_build}
-      "${CMAKE_SHARED_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
-      )
+    SET(_type "SHARED")
   ELSE()
-    SET(CONFIG_LIBRARY_${_build}
-      "${CMAKE_STATIC_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
-      )
+    SET(_type "STATIC")
   ENDIF()
 
   IF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN" OR CMAKE_SYSTEM_NAME MATCHES "Windows")
-    SET(CONFIG_LIBRARIES_${_build}
-      \${DEAL_II_PATH}/\${DEAL_II_EXECUTABLE_RELDIR}/${CONFIG_LIBRARY_${_build}}
-      )
+    SET(_reldir "\${DEAL_II_EXECUTABLE_RELDIR}")
   ELSE()
-    SET(CONFIG_LIBRARIES_${_build}
-      \${DEAL_II_PATH}/\${DEAL_II_LIBRARY_RELDIR}/${CONFIG_LIBRARY_${_build}}
-      )
+    SET(_reldir "\${DEAL_II_LIBRARY_RELDIR}")
   ENDIF()
 
-  LIST(APPEND CONFIG_LIBRARIES_${_build}
+  SET(CONFIG_LIBRARIES_${_build}
+    "\${DEAL_II_PATH}/${_reldir}/${CMAKE_${_type}_LIBRARY_PREFIX}${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}${CMAKE_${_type}_LIBRARY_SUFFIX}"
     ${DEAL_II_LIBRARIES_${_build}}
     ${DEAL_II_LIBRARIES}
     )
-  LIST(APPEND CONFIG_LIBRARIES
-    ${_keyword}
-    \${DEAL_II_LIBRARIES_${_build}}
-    )
+  LIST(APPEND CONFIG_LIBRARIES ${_keyword} \${DEAL_II_LIBRARIES_${_build}})
 
-  SET(CONFIG_TARGET_${_build}
-    ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX}
-    )
-  LIST(APPEND CONFIG_TARGET
-    ${_keyword}
-    \${DEAL_II_TARGET_${_build}}
-    )
+  SET(CONFIG_TARGET_${_build} ${DEAL_II_BASE_NAME}${DEAL_II_${_build}_SUFFIX})
+  LIST(APPEND CONFIG_TARGET ${_keyword} \${DEAL_II_TARGET_${_build}})
 ENDFOREACH()
 
 #
@@ -140,9 +126,7 @@ ENDFOREACH()
 SET(CONFIG_BUILD_DIR TRUE)
 SET(CONFIG_INCLUDE_DIRS
   \${DEAL_II_PATH}/include
-  \${DEAL_II_PATH}/include/deal.II
   ${CMAKE_SOURCE_DIR}/include/
-  ${CMAKE_SOURCE_DIR}/include/deal.II
   ${DEAL_II_BUNDLED_INCLUDE_DIRS}
   ${DEAL_II_USER_INCLUDE_DIRS}
   )
@@ -164,7 +148,6 @@ CONFIGURE_FILE(
 SET(CONFIG_BUILD_DIR FALSE)
 SET(CONFIG_INCLUDE_DIRS
   \${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}
-  \${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}/deal.II
   \${DEAL_II_PATH}/\${DEAL_II_INCLUDE_RELDIR}/deal.II/bundled
   ${DEAL_II_USER_INCLUDE_DIRS}
   )
diff --git a/cmake/config/Make.global_options.in b/cmake/config/Make.global_options.in
new file mode 100644 (file)
index 0000000..a0ed43c
--- /dev/null
@@ -0,0 +1,125 @@
+## ---------------------------------------------------------------------
+##
+## Copyright (C) 2014 - 2015 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+
+########################################################################
+##                                                                    ##
+##               The deal.II project configuration file               ##
+##                                                                    ##
+########################################################################
+
+
+#
+# General information
+#
+
+DEAL_II_PACKAGE_NAME = @DEAL_II_PACKAGE_NAME@
+DEAL_II_PACKAGE_VERSION = @DEAL_II_PACKAGE_VERSION@
+DEAL_II_PACKAGE_VENDOR = @DEAL_II_PACKAGE_VENDOR@
+DEAL_II_PACKAGE_DESCRIPTION = @DEAL_II_PACKAGE_DESCRIPTION@
+
+DEAL_II_VERSION_MAJOR = @DEAL_II_VERSION_MAJOR@
+DEAL_II_VERSION_MINOR = @DEAL_II_VERSION_MINOR@
+DEAL_II_VERSION_SUBMINOR = @DEAL_II_VERSION_SUBMINOR@
+DEAL_II_VERSION = @DEAL_II_VERSION@
+
+DEAL_II_PROJECT_CONFIG_NAME = @DEAL_II_PROJECT_CONFIG_NAME@
+
+DEAL_II_BUILD_TYPE = @CMAKE_BUILD_TYPE@
+DEAL_II_BUILD_TYPES = @DEAL_II_BUILD_TYPES@
+
+#
+# Information about the project location
+#
+
+DEAL_II_CMAKE_MACROS_RELDIR = @DEAL_II_CMAKE_MACROS_RELDIR@
+DEAL_II_SHARE_RELDIR = @DEAL_II_SHARE_RELDIR@
+DEAL_II_DOCREADME_RELDIR = @DEAL_II_DOCREADME_RELDIR@
+DEAL_II_DOCHTML_RELDIR = @DEAL_II_DOCHTML_RELDIR@
+DEAL_II_EXAMPLES_RELDIR = @DEAL_II_EXAMPLES_RELDIR@
+DEAL_II_EXECUTABLE_RELDIR = @DEAL_II_EXECUTABLE_RELDIR@
+DEAL_II_INCLUDE_RELDIR = @DEAL_II_INCLUDE_RELDIR@
+DEAL_II_LIBRARY_RELDIR = @DEAL_II_LIBRARY_RELDIR@
+DEAL_II_PROJECT_CONFIG_RELDIR = @DEAL_II_PROJECT_CONFIG_RELDIR@
+
+#
+# Determine DEAL_II_PATH from CMAKE_CURRENT_LIST_DIR:
+#
+
+mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
+
+DEAL_II_PATH := 
+
+#
+# Information about configuration:
+#
+
+DEAL_II_PROJECT_CONFIG_INCLUDED = true
+DEAL_II_BUILD_DIR = @CONFIG_BUILD_DIR@
+
+
+#
+# Compiler and linker configuration
+#
+
+DEAL_II_CXX_COMPILER = @CMAKE_CXX_COMPILER@
+
+# used for all targets:
+DEAL_II_CXX_FLAGS = @DEAL_II_CXX_FLAGS@
+
+# _additionally_ used for debug targets:
+DEAL_II_CXX_FLAGS_DEBUG = @DEAL_II_CXX_FLAGS_DEBUG@
+
+# _additionally_ used for release targets:
+DEAL_II_CXX_FLAGS_RELEASE = @DEAL_II_CXX_FLAGS_RELEASE@
+
+# used for all targets:
+DEAL_II_LINKER_FLAGS = @DEAL_II_LINKER_FLAGS@
+
+# _additionally_ used for debug targets:
+DEAL_II_LINKER_FLAGS_DEBUG = @DEAL_II_LINKER_FLAGS_DEBUG@
+
+# _additionally_ used for release targets:
+DEAL_II_LINKER_FLAGS_RELEASE = @DEAL_II_LINKER_FLAGS_RELEASE@
+
+# used for all targets:
+DEAL_II_USER_DEFINITIONS = @DEAL_II_USER_DEFINITIONS@
+
+# _additionally_ used for debug targets:
+DEAL_II_USER_DEFINITIONS_DEBUG = @DEAL_II_USER_DEFINITIONS_DEBUG@
+
+# _additionally_ used for release targets:
+DEAL_II_USER_DEFINITIONS_RELEASE = @DEAL_II_USER_DEFINITIONS_RELEASE@
+
+
+#
+# Build a static executable:
+#
+
+DEAL_II_STATIC_EXECUTABLE = @DEAL_II_STATIC_EXECUTABLE@
+
+
+#
+# Information about include directories and libraries
+#
+
+# Full list of include directories:
+DEAL_II_INCLUDE_DIRS = @CONFIG_INCLUDE_DIRS@
+
+# Full list of libraries for the debug target:
+DEAL_II_LIBRARIES_DEBUG = @CONFIG_LIBRARIES_DEBUG@
+
+# Full list of libraries for the release target:
+DEAL_II_LIBRARIES_RELEASE = @CONFIG_LIBRARIES_RELEASE@

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.