From: Fletcher T. Penney Date: Fri, 13 Nov 2015 00:18:21 +0000 (-0500) Subject: use static linking for Linux to try to make binaries more compatible X-Git-Tag: 0.1.0a~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f302a6184ed7141b57a72ee6dba74461d4120622;p=multimarkdown use static linking for Linux to try to make binaries more compatible --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0040eb1..078636f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,6 +173,12 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") # Create zip archive set (CPACK_GENERATOR ZIP) + # Statically link libraries -- might make the binary slightly more + # compatible across Linux distributions, for example + set (CMAKE_FIND_LIBRARY_SUFFIXES ".a") + set (BUILD_SHARED_LIBRARIES OFF) + set (CMAKE_EXE_LINKER_FLAGS "-static") + # Some libraries need to be linked on some Linux builds if (DEFINED TEST) # target_link_libraries(run_tests m)