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
|
Author: Andreas Tille <tille@debian.org>
Last-Update: Tue, 28 Nov 2017 10:37:22 +0100
Description: Dynamic linking against own library
Does not work unfortunately
--- a/gatb-core/tools/CMakeLists.txt
+++ b/gatb-core/tools/CMakeLists.txt
@@ -20,23 +20,7 @@ FOREACH (program ${PROGRAMS})
add_executable(${program} ${program}.cpp)
target_link_libraries(${program} ${gatb-core-libraries})
- # (rayan) attempt at static linking, not sure if it works properly
- # but we need this to distribute binaries that are compatible on old system
- # (see lh3's post on Biostar during the 2.0.1 dsk/minia release, he could not
- # run dsk even though i compiled it on gcc 4.4.7 on genocluster2)
- if (static)
- set_target_properties(${program} PROPERTIES LINK_SEARCH_START_STATIC w1)
- set_target_properties(${program} PROPERTIES LINK_SEARCH_END_STATIC 1)
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
- if (APPLE)
- set(CMAKE_EXE_LINKER_FLAGS "-static-libstdc++") #removed -static because doesn't work on mac's
- else()
- set(CMAKE_EXE_LINKER_FLAGS "-static-libstdc++ -static")
- endif()
- message ("STATIC BINARIES for ${program}")
- else()
message ("DYNAMIC BINARIES for ${program}")
- endif()
ENDFOREACH (program)
|