1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/cmake/static_link.cmake
2019-09-18 21:33:08 +01:00

13 lines
229 B
CMake

if(NOT STATIC_LINK)
return()
endif()
if(NOT CMAKE_CROSSCOMPILING)
add_compile_options(-static -flto)
else()
add_compile_options(-static)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
link_libraries( -flto)
endif()