[med-svn] [Git][med-team/fast][master] Modify cmake to allow for both *.so and *.a libraries

Shayan Doust gitlab at salsa.debian.org
Mon Aug 19 20:43:54 BST 2019



Shayan Doust pushed to branch master at Debian Med / fast


Commits:
d7150710 by Shayan Doust at 2019-08-19T10:02:02Z
Modify cmake to allow for both *.so and *.a libraries

- - - - -


2 changed files:

- debian/patches/use_system_libs.patch → debian/patches/modify_libs_and_output.patch
- debian/patches/series


Changes:

=====================================
debian/patches/use_system_libs.patch → debian/patches/modify_libs_and_output.patch
=====================================
@@ -1,12 +1,12 @@
-Description: modify cmake files to use system wide "apt" packaged libs
- This patch will alter some of the cmake files in order to use the system-wide installable libs instead of allowing cmake to use git and download / build itself.
+Description: modify cmake files to use system wide "apt" packaged libs & build static
+ This patch will alter some of the cmake files in order to use the system-wide installable libs instead of allowing cmake to use git and download / build itself. Additionally, build a static library *.a too.
 Author: Shayan Doust <hello at shayandoust.me>
 ---
 
 Index: fast/CMakeLists.txt
 ===================================================================
---- fast.orig/CMakeLists.txt	2019-08-11 12:39:38.645227873 +0100
-+++ fast/CMakeLists.txt	2019-08-11 12:39:38.641227839 +0100
+--- fast.orig/CMakeLists.txt	2019-08-19 10:48:04.682259959 +0100
++++ fast/CMakeLists.txt	2019-08-19 10:48:04.678259926 +0100
 @@ -34,7 +34,7 @@
  option(FAST_MODULE_WholeSlideImaging "Build whole slide imaging module" OFF)
  option(FAST_MODULE_Clarius "Build clarius ultrasound module" OFF)
@@ -16,16 +16,23 @@ Index: fast/CMakeLists.txt
  
  # Python version
  set(FAST_Python_Version "" CACHE STRING "Specify which Python version to build python wrappers with. E.g. 2 or 3")
-@@ -157,7 +157,7 @@
+@@ -157,10 +157,14 @@
  
  #### Create FAST library and executables
  add_library(FAST SHARED ${FAST_SOURCE_FILES} ${HEADERS_MOC})
 -add_dependencies(FAST ${FAST_EXTERNAL_DEPENDENCIES})
++add_library(FAST-STATIC STATIC ${FAST_SOURCE_FILES} ${HEADERS_MOC})
 +#add_dependencies(FAST ${FAST_EXTERNAL_DEPENDENCIES})
  include(GenerateExportHeader)
  generate_export_header(FAST EXPORT_FILE_NAME FASTExport.hpp)
  
-@@ -170,6 +170,18 @@
++
++set_target_properties(FAST-STATIC PROPERTIES OUTPUT_NAME FAST CLEAN_DIRECT_OUTPUT 1)
++
+ include(cmake/OpenMP.cmake)
+ 
+ ## Link everything
+@@ -170,6 +174,18 @@
      qt5_use_modules(FAST Widgets OpenGL) # Add Qt 5 modules
  endif()
  
@@ -44,3 +51,11 @@ Index: fast/CMakeLists.txt
  ## Build test executable
  if(FAST_BUILD_TESTS)
      add_executable(testFAST ${FAST_TEST_SOURCE_FILES} source/FAST/Algorithms/CoherentPointDrift/Rigid.cpp source/FAST/Algorithms/CoherentPointDrift/Rigid.hpp source/FAST/Algorithms/CoherentPointDrift/Affine.cpp source/FAST/Algorithms/CoherentPointDrift/Affine.hpp)
+@@ -243,5 +259,7 @@
+     include(cmake/FASTCustomCommands.cmake)
+ endif(NOT FAST_BUILD_QT5 AND WIN32)
+ 
++install(TARGETS FAST-STATIC DESTINATION .)
++
+ include(cmake/ModulePython.cmake)
+ include(cmake/InstallFAST.cmake)


=====================================
debian/patches/series
=====================================
@@ -1,5 +1,5 @@
 fix_source_openigtlink.patch
 prevent_cmake_downloading.patch
 remove_unneeded_installs.patch
-use_system_libs.patch
+modify_libs_and_output.patch
 set_cmake_options.patch



View it on GitLab: https://salsa.debian.org/med-team/fast/commit/d7150710f35be7ce6f008aad438e7996bd0d7984

-- 
View it on GitLab: https://salsa.debian.org/med-team/fast/commit/d7150710f35be7ce6f008aad438e7996bd0d7984
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190819/f6d10665/attachment-0001.html>


More information about the debian-med-commit mailing list