]> https://gitweb.dealii.org/ - dealii.git/commitdiff
first corrections
authorAlberto Sartori <alberto.sartori86@gmail.com>
Wed, 31 Oct 2018 08:19:12 +0000 (09:19 +0100)
committerMatthias Maier <tamiko@43-1.org>
Thu, 15 Nov 2018 17:17:44 +0000 (11:17 -0600)
cmake/config/CMakeLists.txt
cmake/config/deal.II.pc.in [moved from cmake/config/pkgconfig/deal.II.pc.in with 100% similarity]
cmake/config/deal.II_base.pc.in [moved from cmake/config/pkgconfig/deal.II_base.pc.in with 91% similarity]
cmake/config/deal.II_debug.pc.in [moved from cmake/config/pkgconfig/deal.II_debug.pc.in with 60% similarity]
cmake/config/deal.II_release.pc.in [moved from cmake/config/pkgconfig/deal.II_release.pc.in with 60% similarity]
cmake/config/pkgconfig/CMakeLists.txt [deleted file]
cmake/config/pkgconfig/deal.II_general.pc.in [deleted file]

index a232dd89950efb570f177c4cb4af087a20a78893..5eb4b01e08d981bbf794f3ac39937855be4ef46d 100644 (file)
@@ -159,8 +159,6 @@ SET(CONFIG_INCLUDE_DIRS
   ${DEAL_II_USER_INCLUDE_DIRS}
   )
 
-SET(CONFIG_INCLUDE_DIRS_INSTALL_PC ${CONFIG_INCLUDE_DIRS}) # for pkgconfig
-
 CONFIGURE_FILE(
   ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
   ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
@@ -225,9 +223,156 @@ FOREACH(_name ${_deal_ii_features_sorted})
   ENDFOREACH()
 ENDFOREACH()
 
-# just for mac and linux
-if(NOT MSVC)
-  add_subdirectory(pkgconfig)
-endif()
+#####################################################################
+# pkgconfig files
+#
+# Set up the pkgconfig configuration files consisting of
+#
+#   deal.II_base       # common part to all the rest
+#   deal.II_debug      # generated when buildtype is debug
+#   deal.II_release    # generated when buildtype is release
+#
+# 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 setups.
+#
+# pkgconfig looks for *.pc files in an environmental variable called
+# PKG_CONFIG_PATH. So, to use the library in the build directory issue
+# export PKG_CONFIG_PATH=/path/to/BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
+#
+# To use the library in the installed location
+# export PKG_CONFIG_PATH=/path/to/INSTALL_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
+#
+
+#
+# For binary dir (AKA build dir):
+#
+
+set(DEAL_II_PATH_PC ${CMAKE_BINARY_DIR})
+
+set (CONFIG_INCLUDE_DIRS_PC "")
+foreach(_dir ${CONFIG_INCLUDE_DIRS_BUILD_PC})
+  string(CONCAT CONFIG_INCLUDE_DIRS_PC "${CONFIG_INCLUDE_DIRS_PC} -I${_dir} "  )
+endforeach()
+
+# populate the variables
+# CONFIG_LIBRARIES_DEBUG_PC 
+# CONFIG_LIBRARIES_RELEASE_PC
+
+foreach (_build ${DEAL_II_BUILD_TYPES})
+  if(_build MATCHES DEBUG)
+    set(_build "debug")
+  else()
+    set(_build "release")
+  endif()
+
+  string(TOUPPER ${_build} _B)
+  set(PC_LIBRARIES ${CONFIG_LIBRARIES_${_B}})
+  set(CONFIG_LIBRARIES_PC "")
+  foreach(_s ${PC_LIBRARIES})
+    # check if _s contains lib
+    # if _s is somethink like /path/to/trilinos/lib/libteuchos.so
+    # we have  to add /path/to/trilinos/lib to the runpath
+    if(${_s} MATCHES "lib")
+      string(CONCAT CONFIG_LIBRARIES_PC " ${CONFIG_LIBRARIES_PC} ${_s} ")
+
+      # work for the runpath
+      string(FIND ${_s} "/" _i REVERSE)
+      string(SUBSTRING ${_s} 0 ${_i} _p)
+      list(APPEND PC_RPATH ${_p})
+    else()
+      # here _s is something like "m" for the libm.so so we add the -l flag
+      string(CONCAT CONFIG_LIBRARIES_PC " ${CONFIG_LIBRARIES_PC} -l${_s} "  )
+    endif()
+  endforeach()
+
+  set(CONFIG_LIBRARIES_${_B}_PC ${CONFIG_LIBRARIES_PC})
+  
+  list(REMOVE_DUPLICATES PC_RPATH)
+  foreach(_r ${PC_RPATH})
+    string(CONCAT CONFIG_LIBRARIES_${_B}_PC " ${CONFIG_LIBRARIES_${_B}_PC} -Wl,-rpath,${_r} "  )
+  endforeach()
+
+endforeach()
+
+configure_file(
+  ${CMAKE_CURRENT_SOURCE_DIR}/deal.II_base.pc.in
+  ${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}/pkgconfig/${DEAL_II_PROJECT_CONFIG_NAME}_base.pc
+  @ONLY
+  )
+
+# generate the requested .pc files
+foreach (_build ${DEAL_II_BUILD_TYPES})
+  if(_build MATCHES DEBUG)
+    set(_build "debug")
+  else()
+    set(_build "release")
+  endif()
+
+  configure_file(
+    ${CMAKE_CURRENT_SOURCE_DIR}/deal.II_${_build}.pc.in
+    ${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}/pkgconfig/${DEAL_II_PROJECT_CONFIG_NAME}_${_build}.pc
+    @ONLY
+    )
+endforeach()
+
+#############################################################################
+#
+# For installation:
+#
+
+set(DEAL_II_PATH_PC ${CMAKE_INSTALL_PREFIX})
+
+set (CONFIG_INCLUDE_DIRS_PC "")
+foreach(_dir ${CONFIG_INCLUDE_DIRS})
+  string(CONCAT CONFIG_INCLUDE_DIRS_PC "${CONFIG_INCLUDE_DIRS_PC} -I${_dir} "  )
+endforeach()
+
+configure_file(
+  ${CMAKE_CURRENT_SOURCE_DIR}/deal.II_base.pc.in
+  ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}_base.pc
+  @ONLY
+  )
+
+install(FILES
+  ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}_base.pc
+  DESTINATION ${DEAL_II_LIBRARY_RELDIR}/pkgconfig
+  COMPONENT library
+  )
+
+
+# generate the requested .pc files
+foreach (_build ${DEAL_II_BUILD_TYPES})
+  if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease")
+    set(_build "general")
+  else()
+    if(_build MATCHES DEBUG)
+      set(_build "debug")
+    else()
+      set(_build "release")
+    endif()
+  endif()
+
+  configure_file(
+    ${CMAKE_CURRENT_SOURCE_DIR}/deal.II_${_build}.pc.in
+    ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}_${_build}.pc
+    @ONLY
+    )
+  install(FILES
+    ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}_${_build}.pc
+    DESTINATION ${DEAL_II_LIBRARY_RELDIR}/pkgconfig
+    COMPONENT library
+    )
+endforeach()
+
+
+
+
+
+
+
+
+# end of pkgconfig files
+####################################################################
 
 MESSAGE(STATUS "Setting up project configuration - Done")
similarity index 91%
rename from cmake/config/pkgconfig/deal.II_base.pc.in
rename to cmake/config/deal.II_base.pc.in
index 7194991a97dc1418d0aa54da844bcbee609adc78..81d981162c2bad5c6c3866543a5de9f493ff97ce 100644 (file)
@@ -1,7 +1,6 @@
 DEAL_II_PATH=@DEAL_II_PATH_PC@
 DEAL_II_INCLUDE_RELDIR=@DEAL_II_INCLUDE_RELDIR@
 libdir=${DEAL_II_PATH}/@DEAL_II_LIBRARY_RELDIR@
-includedir=@CONFIG_INCLUDE_DIRS_PC@
 
 Name: deal.II_base
 Description: base file used by the debug and release versions
similarity index 60%
rename from cmake/config/pkgconfig/deal.II_debug.pc.in
rename to cmake/config/deal.II_debug.pc.in
index 01cbd9c6a5909fd53b0e40434ae3e20fd5f2eed1..868cb996a8b0a57b62b7fb97009dd074734131fd 100644 (file)
@@ -1,9 +1,9 @@
 DEAL_II_PATH=@DEAL_II_PATH_PC@
 Name: deal.II compiled in debug mode
-Description:  A C++ software library supporting the creation of finite element codes and an open community of users and developers. 
+Description: A C++ software library supporting the creation of finite element codes and an open community of users and developers. 
 Version: @DEAL_II_VERSION@
 URL: https://github.com/dealii/dealii
-Requires:deal.II_base
+Requires: deal.II_base
 Cflags: @DEAL_II_CXX_FLAGS_DEBUG@
 Libs: @DEAL_II_LINKER_FLAGS_DEBUG@  @CONFIG_LIBRARIES_DEBUG_PC@
 
similarity index 60%
rename from cmake/config/pkgconfig/deal.II_release.pc.in
rename to cmake/config/deal.II_release.pc.in
index af84a83fea2247fecd03286d343522074b859a8f..daaf6cac57c6dfd0cc8682f71b8e866dcc39a148 100644 (file)
@@ -1,8 +1,8 @@
 DEAL_II_PATH=@DEAL_II_PATH_PC@
 Name: deal.II compiled in debug mode
-Description:  A C++ software library supporting the creation of finite element codes and an open community of users and developers. 
+Description: A C++ software library supporting the creation of finite element codes and an open community of users and developers. 
 Version: @DEAL_II_VERSION@
 URL: https://github.com/dealii/dealii
-Requires:deal.II_base
+Requires: deal.II_base
 Cflags: @DEAL_II_CXX_FLAGS_RELEASE@
 Libs: @DEAL_II_LINKER_FLAGS_RELEASE@  @CONFIG_LIBRARIES_RELEASE_PC@
diff --git a/cmake/config/pkgconfig/CMakeLists.txt b/cmake/config/pkgconfig/CMakeLists.txt
deleted file mode 100644 (file)
index c285ba7..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-## ---------------------------------------------------------------------
-##
-## Copyright (C) 2018 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.md at
-## the top level directory of deal.II.
-##
-## ---------------------------------------------------------------------
-
-#
-# This file sets up the pkgconfig configuration files consisting of
-#
-#   deal.II_base       # common part to all the rest
-#   deal.II_debug      # generated when buildtype is debug
-#   deal.II_release    # generated when buildtype is release
-#   deal.II_general    # generated when buildtype is different from above
-#
-# 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 setups.
-#
-# pkgconfig looks for *.pc files in an environmental variable called
-# PKG_CONFIG_PATH. So, to use the library in the build directory issue
-# export PKG_CONFIG_PATH=/path/to/BUILD_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
-#
-# To use the library in the installed location
-# export PKG_CONFIG_PATH=/path/to/INSTALL_DIR/lib/pkgconfig:$PKG_CONFIG_PATH
-#
-
-
-#
-# For binary dir (AKA build dir):
-#
-
-set(DEAL_II_PATH_PC ${CMAKE_BINARY_DIR})
-
-set (CONFIG_INCLUDE_DIRS_PC "")
-foreach(_s ${CONFIG_INCLUDE_DIRS_BUILD_PC})
-  string(CONCAT CONFIG_INCLUDE_DIRS_PC "${CONFIG_INCLUDE_DIRS_PC} -I${_s} "  )
-endforeach()
-
-# populate the variables
-# CONFIG_LIBRARIES_DEBUG_PC 
-# CONFIG_LIBRARIES_RELEASE_PC
-# CONFIG_LIBRARIES_GENERAL_PC
-foreach (_build ${DEAL_II_BUILD_TYPES})
-  if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease")
-    set(_build "general")
-  else()
-    if(_build MATCHES DEBUG)
-      set(_build "debug")
-    else()
-      set(_build "release")
-    endif()
-  endif()
-
-  string(TOUPPER ${_build} _B)
-  set(PC_LIBRARIES ${CONFIG_LIBRARIES_${_B}})
-  set(CONFIG_LIBRARIES_PC "")
-  foreach(_s ${PC_LIBRARIES})
-    # check if _s contains lib
-    # if _s is somethink like /path/to/trilinos/lib/libteuchos.so
-    # we have  to add /path/to/trilinos/lib to the runpath
-    if(${_s} MATCHES "lib")
-      string(CONCAT CONFIG_LIBRARIES_PC " ${CONFIG_LIBRARIES_PC} ${_s} ")
-
-      # work for the runpath
-      string(FIND ${_s} "/" _i REVERSE)
-      string(SUBSTRING ${_s} 0 ${_i} _p)
-      list(APPEND PC_RPATH ${_p})
-    else()
-      # here _s is something like "m" for the libm.so so we add the -l flag
-      string(CONCAT CONFIG_LIBRARIES_PC " ${CONFIG_LIBRARIES_PC} -l${_s} "  )
-    endif()
-  endforeach()
-
-  set(CONFIG_LIBRARIES_${_B}_PC ${CONFIG_LIBRARIES_PC})
-  
-  list(REMOVE_DUPLICATES PC_RPATH)
-  foreach(_r ${PC_RPATH})
-    string(CONCAT CONFIG_LIBRARIES_${_B}_PC " ${CONFIG_LIBRARIES_${_B}_PC} -Wl,-rpath,${_r} "  )
-  endforeach()
-
-endforeach()
-
-configure_file(
-  ${CMAKE_CURRENT_SOURCE_DIR}/deal.II_base.pc.in
-  ${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}/pkgconfig/${DEAL_II_PROJECT_CONFIG_NAME}_base.pc
-  @ONLY
-  )
-
-# generate the requested .pc files
-foreach (_build ${DEAL_II_BUILD_TYPES})
-  if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease")
-    set(_build "general")
-  else()
-    if(_build MATCHES DEBUG)
-      set(_build "debug")
-    else()
-      set(_build "release")
-    endif()
-  endif()
-
-  configure_file(
-    ${CMAKE_CURRENT_SOURCE_DIR}/deal.II_${_build}.pc.in
-    ${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}/pkgconfig/${DEAL_II_PROJECT_CONFIG_NAME}_${_build}.pc
-    @ONLY
-    )
-endforeach()
-
-#############################################################################
-#
-# For installation:
-#
-
-set(DEAL_II_PATH_PC ${CMAKE_INSTALL_PREFIX})
-
-set (CONFIG_INCLUDE_DIRS_PC "")
-foreach(_s ${CONFIG_INCLUDE_DIRS_INSTALL_PC})
-  string(CONCAT CONFIG_INCLUDE_DIRS_PC "${CONFIG_INCLUDE_DIRS_PC} -I${_s} "  )
-endforeach()
-
-configure_file(
-  ${CMAKE_CURRENT_SOURCE_DIR}/deal.II_base.pc.in
-  ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}_base.pc
-  @ONLY
-  )
-
-install(FILES
-  ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}_base.pc
-  DESTINATION ${DEAL_II_LIBRARY_RELDIR}/pkgconfig
-  COMPONENT library
-  )
-
-
-# generate the requested .pc files
-foreach (_build ${DEAL_II_BUILD_TYPES})
-  if(NOT "${CMAKE_BUILD_TYPE}" STREQUAL "DebugRelease")
-    set(_build "general")
-  else()
-    if(_build MATCHES DEBUG)
-      set(_build "debug")
-    else()
-      set(_build "release")
-    endif()
-  endif()
-
-  configure_file(
-    ${CMAKE_CURRENT_SOURCE_DIR}/deal.II_${_build}.pc.in
-    ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}_${_build}.pc
-    @ONLY
-    )
-  install(FILES
-    ${CMAKE_CURRENT_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_NAME}_${_build}.pc
-    DESTINATION ${DEAL_II_LIBRARY_RELDIR}/pkgconfig
-    COMPONENT library
-    )
-endforeach()
-
diff --git a/cmake/config/pkgconfig/deal.II_general.pc.in b/cmake/config/pkgconfig/deal.II_general.pc.in
deleted file mode 100644 (file)
index 55bf088..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-DEAL_II_PATH=@DEAL_II_PATH_PC@
-Name: deal.II compiled in debug mode
-Description:  A C++ software library supporting the creation of finite element codes and an open community of users and developers. 
-Version: @DEAL_II_VERSION@
-URL: https://github.com/dealii/dealii
-Requires:deal.II_base
-Cflags: @DEAL_II_CXX_FLAGS_GENERAL@
-Libs: @DEAL_II_LINKER_FLAGS_GENERAL@  @CONFIG_LIBRARIES_GENERAL_PC@
-
-

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.