[med-svn] [gatb-core] 01/01: gatb-core/CMakeLists.txt: Use result of FindHDF5

Gert Wollny gewo at moszumanska.debian.org
Sat Dec 9 23:19:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

gewo pushed a commit to branch master
in repository gatb-core.

commit 2d0338b047f31141c0e3d6a818a4ea78567851ab
Author: Gert Wollny <gewo at debian.org>
Date:   Sun Dec 10 00:12:11 2017 +0100

    gatb-core/CMakeLists.txt: Use result of FindHDF5
    
    also move the declaration of the libraries dependencies before the
    subirectories.
---
 debian/patches/use_debian_packaged_hdf5.patch | 50 +++++++++++++++++++++++----
 1 file changed, 43 insertions(+), 7 deletions(-)

diff --git a/debian/patches/use_debian_packaged_hdf5.patch b/debian/patches/use_debian_packaged_hdf5.patch
index 71dbf7d..28b13de 100644
--- a/debian/patches/use_debian_packaged_hdf5.patch
+++ b/debian/patches/use_debian_packaged_hdf5.patch
@@ -13,7 +13,7 @@ Description: Use Debian packaged hdf5
  ##########  MOMENTARY DEACTIVATED => CRASH ON MACOS TO BE INVESTIGATED  ##########
  SET (HDF5_BUILD_TOOLS             ON CACHE BOOL "Build HDF5 Tools")
  #SET (CMAKE_EXE_LINKER_FLAGS       "-lpthread -lz")
-@@ -16,9 +18,9 @@ SET (HDF5_EXTERNALLY_CONFIGURED     ON)
+@@ -16,9 +18,9 @@
  SET (HDF5_INSTALL_BIN_DIR           bin)
  SET (HDF5_INSTALL_LIB_DIR           lib)
  
@@ -26,7 +26,7 @@ Description: Use Debian packaged hdf5
  
  IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUDE)
      SET (HDF5_EXPORTED_TARGETS          "gatb-hdf5")
-@@ -32,23 +34,6 @@ ENDIF()
+@@ -32,23 +34,6 @@
  set (COMPILE_DEFINITIONS  "${COMPILE_DEFINITIONS}  -w")
  add_definitions (${COMPILE_DEFINITIONS})
  
@@ -52,16 +52,52 @@ Description: Use Debian packaged hdf5
  add_custom_target (thirdparty_copy ALL)
 --- a/gatb-core/CMakeLists.txt
 +++ b/gatb-core/CMakeLists.txt
-@@ -258,7 +258,11 @@ ADD_SUBDIRECTORY(thirdparty)
- #  DEPENDENCIES 
- ################################################################################
- # we must be sure that hdf5 is built and installed before building gatb-core
--ADD_DEPENDENCIES (gatbcore-static hdf5 hdf5_postbuild)
+@@ -211,16 +211,23 @@
+ set (gatb-core-includes ${PROJECT_BINARY_DIR}/include  ${PROJECT_BINARY_DIR}/include/${CMAKE_BUILD_TYPE} ${PROJECT_SOURCE_DIR}/src  ${PROJECT_SOURCE_DIR}/thirdparty ${gatb-core-extra-libraries-inc})
+ 
+ # We define the libraries used for linking binary based on gatb core
+-set (gatb-core-libraries   gatbcore-static  dl  pthread  z hdf5 ${gatb-core-extra-libraries})
++set (gatb-core-libraries   gatbcore-static  dl  pthread  z ${gatb-core-extra-libraries})
+ 
+ # We define the directory where to find cmake helpers
+ set (gatb-core-cmake  ${CMAKE_MODULE_PATH})
+ 
+-# NOTE... we have to duplicate the variables for the other scopes (in particular for sub directories)
+-set (gatb-core-flags          ${gatb-core-flags}          PARENT_SCOPE)
+-set (gatb-core-includes       ${gatb-core-includes}       PARENT_SCOPE)
+-set (gatb-core-libraries      ${gatb-core-libraries}      PARENT_SCOPE)
+-set (gatb-core-cmake          ${gatb-core-cmake}          PARENT_SCOPE)
++################################################################################
++#  DEPENDENCIES 
++################################################################################
++# we must be sure that hdf5 is built and installed before building gatb-core
 +find_package(HDF5 REQUIRED)
 +include_directories(${HDF5_INCLUDE_DIRS})
 +# Not sure what exact programs will need these libraries
 +#  see https://lists.debian.org/debian-mentors/2017/11/msg00227.html
 +# target_link_libraries(name_of_program_or_library ${HDF5_LIBRARIES})
++set (gatb-core-libraries  ${gatb-core-libraries} ${HDF5_LIBRARIES})
++MESSAGE(STATUS HDF5_LIBRARIES="${HDF5_LIBRARIES}")
++
+ 
+ ################################################################################
+ #  LIBRARY GENERATION 
+@@ -253,11 +260,13 @@
+ ################################################################################
+ ADD_SUBDIRECTORY(thirdparty)
+ 
+-################################################################################
+-#  DEPENDENCIES 
+-################################################################################
+-# we must be sure that hdf5 is built and installed before building gatb-core
+-ADD_DEPENDENCIES (gatbcore-static hdf5 hdf5_postbuild)
++
++# NOTE... we have to duplicate the variables for the other scopes (in particular for sub directories)
++set (gatb-core-flags          ${gatb-core-flags}          PARENT_SCOPE)
++set (gatb-core-includes       ${gatb-core-includes}       PARENT_SCOPE)
++set (gatb-core-libraries      ${gatb-core-libraries}      PARENT_SCOPE)
++set (gatb-core-cmake          ${gatb-core-cmake}          PARENT_SCOPE)
++
  
  ################################################################################
  #  DOCUMENTATION GENERATION 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/gatb-core.git



More information about the debian-med-commit mailing list