Package: spoa / 1.1.3-2~bpo9+1

shared_and_static.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Author: Andreas Tille <tille@debian.org>
Last-Update:  Fri, 08 Jun 2018 13:20:51 +0200
Description: Build shared and static lib

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,9 +16,15 @@ option(spoa_build_executable "Build spoa
 option(spoa_build_tests "Build spoa unit tests" OFF)
 
 # build SPOA as a static library by default
-set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build all libraries as shared")
+# set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build all libraries as shared")
 
-add_library(spoa
+add_library(spoa SHARED
+    src/alignment_engine.cpp
+    src/graph.cpp
+    src/simd_alignment_engine.cpp
+    src/sisd_alignment_engine.cpp)
+
+add_library(spoa_static STATIC
     src/alignment_engine.cpp
     src/graph.cpp
     src/simd_alignment_engine.cpp
@@ -28,12 +34,17 @@ target_include_directories(spoa PUBLIC
     $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
     $<INSTALL_INTERFACE:include>)
 
+target_include_directories(spoa_static PUBLIC
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+    $<INSTALL_INTERFACE:include>)
+
 set_target_properties(spoa
     PROPERTIES
     VERSION ${spoa_VERSION}
     SOVERSION ${spoa_VERSION})
 
 install(TARGETS spoa DESTINATION ${CMAKE_INSTALL_LIBDIR})
+install(TARGETS spoa_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
 install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/spoa DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
 
 # configure and install pkg-config file