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