Set -static except on macOS

This commit is contained in:
Frank Denis 2019-06-01 11:30:23 +02:00
parent 15dddd7c45
commit e71c9a7a47

View file

@ -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