Add security library include in CMake for MacOS

This commit is contained in:
Seth Hillbrand 2023-10-20 16:39:37 +02:00
parent 5c5a38af21
commit 36b0aa6050
2 changed files with 10 additions and 0 deletions

View File

@ -767,6 +767,13 @@ find_package( libgit2 REQUIRED )
# Set include directories for libgit
include_directories(${LIBGIT2_INCLUDE_DIRS})
# Find the MacOS security library, required for the MacOS keychain
if( APPLE )
find_library(SECURITY_LIBRARY Security)
else()
set( SECURITY_LIBRARY "" )
endif()
#
# Find Boost headers and libraries, required.
set( BOOST_REQUESTED_COMPONENTS locale ) # locale is required by nanoodbc/database libraries

View File

@ -134,6 +134,9 @@ target_link_libraries( kicommon
${LIBGIT2_LIBRARIES}
${OPENSSL_LIBRARIES}
# MacOS security library. Set to blank on other platforms
${SECURITY_LIBRARY}
# needed by kiid to allow linking for Boost for the UUID against bcrypt (msys2 only)
${EXTRA_LIBS}