mirror of
https://github.com/CPunch/Laika.git
synced 2026-02-05 16:00:03 +00:00
Added LibSodium, new tools/, genKey, sLaika_peer::type
- sLaika_peer has a new member, (PEERTYPE)type - LibSodium dependency added
This commit is contained in:
@@ -14,15 +14,19 @@ project(LaikaLib VERSION ${LAIKA_VERSION_MAJOR}.${LAIKA_VERSION_MINOR})
|
||||
# Put CMake targets (ALL_BUILD/ZERO_CHECK) into a folder
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
set(sodium_USE_STATIC_LIBS)
|
||||
find_package(Sodium)
|
||||
|
||||
# compile LaikaLib library
|
||||
file(GLOB_RECURSE LIBSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/**.c)
|
||||
add_library(LaikaLib STATIC ${LIBSOURCE})
|
||||
target_link_libraries(LaikaLib PRIVATE ${sodium_LIBRARY_RELEASE})
|
||||
|
||||
# add the version definitions and the 'DEBUG' preprocessor definition if we're compiling as Debug
|
||||
target_compile_definitions(LaikaLib PUBLIC LAIKA_VERSION_MAJOR=${LAIKA_VERSION_MAJOR} LAIKA_VERSION_MINOR=${LAIKA_VERSION_MINOR} "$<$<CONFIG:Debug>:DEBUG>")
|
||||
|
||||
# add include directory
|
||||
target_include_directories(LaikaLib PUBLIC ${LIB_INCLUDEDIR})
|
||||
target_include_directories(LaikaLib PUBLIC ${LIB_INCLUDEDIR} ${sodium_INCLUDE_DIR})
|
||||
|
||||
# set library name
|
||||
set_target_properties(LaikaLib PROPERTIES OUTPUT_NAME laika-${LAIKA_VERSION_MAJOR}.${LAIKA_VERSION_MINOR})
|
||||
|
||||
Reference in New Issue
Block a user