From e71c9a7a475a8033f677c6878813ad9aadb02e92 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 1 Jun 2019 11:30:23 +0200 Subject: [PATCH] Set -static except on macOS --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5df28dc..33f03f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,8 +37,10 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) if(BUILD_STATIC_EXECUTABLES) set(sodium_USE_STATIC_LIBS on) + if (NOT APPLE) + set(CMAKE_EXE_LINKER_FLAGS -static) + endif (NOT APPLE) endif(BUILD_STATIC_EXECUTABLES) -set(sodium_USE_STATIC_LIBS on) find_package(Sodium REQUIRED) add_executable(minisign