mirror of
https://gitlab.com/spectre.app/cli.git
synced 2024-11-01 02:41:44 +01:00
Improve cmake search for sodium library.
[IMPROVED] Ability for cmake to find installed sodium library.
This commit is contained in:
parent
c9f84f0620
commit
180cc3db8b
1 changed files with 6 additions and 1 deletions
|
@ -39,6 +39,11 @@ endif()
|
|||
### DEPENDENCIES
|
||||
function( use_spectre_sodium t r )
|
||||
if( USE_SODIUM )
|
||||
find_library( libsodium NAMES sodium )
|
||||
find_path( libsodium_include sodium.h )
|
||||
include_directories("${libsodium_include}")
|
||||
get_filename_component(libsodium_path "${libsodium}" PATH)
|
||||
link_directories("${libsodium_path}")
|
||||
target_link_libraries( "${t}" PRIVATE sodium )
|
||||
target_compile_definitions( "${t}" PRIVATE -DSPECTRE_SODIUM=1 )
|
||||
message( STATUS "${t}: USE_SODIUM is enabled." )
|
||||
|
@ -53,8 +58,8 @@ function( use_spectre_sodium t r )
|
|||
endfunction()
|
||||
|
||||
function( use_spectre_color t )
|
||||
find_package( Curses )
|
||||
if( USE_COLOR )
|
||||
find_package( Curses )
|
||||
if ( CURSES_FOUND )
|
||||
target_include_directories( "${t}" PRIVATE ${CURSES_INCLUDE_DIR} )
|
||||
target_link_libraries( "${t}" PRIVATE ${CURSES_LIBRARIES} )
|
||||
|
|
Loading…
Reference in a new issue