]> granicus.if.org Git - multimarkdown/commitdiff
use static linking for Linux to try to make binaries more compatible
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Fri, 13 Nov 2015 00:18:21 +0000 (19:18 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Fri, 13 Nov 2015 00:18:21 +0000 (19:18 -0500)
CMakeLists.txt

index 0040eb17d41208ceae07cf4ff1d57369ed3c60e5..078636fd331d4395ef12de6d71b860333fde25f4 100644 (file)
@@ -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)