mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
commit
c1e4365d1d
|
@ -25,11 +25,11 @@ if(NOT WIN32)
|
|||
message(STATUS "==== ${CMAKE_C_COMPILER_ID} detected - Adding compiler flags ====")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
|
||||
endif()
|
||||
find_package(SODIUM REQUIRED)
|
||||
endif()
|
||||
|
||||
if(NOT USE_NACL)
|
||||
set(LINK_CRYPTO_LIBRARY ${SODIUM_LIBRARY})
|
||||
find_package(SODIUM REQUIRED)
|
||||
set(LINK_CRYPTO_LIBRARY ${SODIUM_LIBRARY})
|
||||
endif()
|
||||
|
||||
macro(linkCoreLibraries exe_name)
|
||||
|
|
|
@ -26,11 +26,12 @@ set(_SODIUM_ROOT_HINTS
|
|||
|
||||
set(_SODIUM_ROOT_PATHS
|
||||
"$ENV{PROGRAMFILES}/sodium"
|
||||
"${CMAKE_SOURCE_DIR}/sodium"
|
||||
)
|
||||
|
||||
find_path(SODIUM_ROOT_DIR
|
||||
NAMES
|
||||
include/cmocka.h
|
||||
include/sodium.h
|
||||
HINTS
|
||||
${_SODIUM_ROOT_HINTS}
|
||||
PATHS
|
||||
|
@ -48,6 +49,7 @@ find_path(SODIUM_INCLUDE_DIR
|
|||
find_library(SODIUM_LIBRARY
|
||||
NAMES
|
||||
sodium
|
||||
libsodium.a
|
||||
PATHS
|
||||
${SODIUM_ROOT_DIR}/lib
|
||||
)
|
||||
|
|
|
@ -18,3 +18,7 @@ set(core_sources
|
|||
|
||||
add_library(toxcore SHARED ${core_sources})
|
||||
target_link_libraries(toxcore ${SODIUM_LIBRARY})
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(toxcore ws2_32)
|
||||
endif()
|
||||
|
|
|
@ -8,11 +8,10 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/DHT_test.cmake)
|
|||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Lossless_UDP_testclient.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Lossless_UDP_testserver.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Messenger_test.cmake)
|
||||
|
||||
if(WIN32)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/nTox_win32.cmake)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
else()
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/nTox.cmake)
|
||||
add_subdirectory(toxic)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue
Block a user