start with gh ci
This commit is contained in:
17
external/toxcore/CMakeLists.txt
vendored
17
external/toxcore/CMakeLists.txt
vendored
@ -160,7 +160,12 @@ target_compile_definitions(toxcore PUBLIC MIN_LOGGER_LEVEL=LOGGER_LEVEL_INFO)
|
||||
find_package(unofficial-sodium CONFIG QUIET)
|
||||
find_package(sodium QUIET)
|
||||
if(unofficial-sodium_FOUND) # vcpkg
|
||||
target_link_libraries(toxcore unofficial-sodium::sodium unofficial-sodium::sodium_config_public)
|
||||
if(TARGET unofficial-sodium::sodium)
|
||||
target_link_libraries(toxcore unofficial-sodium::sodium)
|
||||
endif()
|
||||
if(TARGET unofficial-sodium::sodium_config_public)
|
||||
target_link_libraries(toxcore unofficial-sodium::sodium_config_public)
|
||||
endif()
|
||||
elseif(sodium_FOUND)
|
||||
target_link_libraries(toxcore sodium)
|
||||
else()
|
||||
@ -171,8 +176,14 @@ if(WIN32)
|
||||
target_link_libraries(toxcore ws2_32 iphlpapi)
|
||||
endif()
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(toxcore Threads::Threads)
|
||||
find_package(pthreads QUIET)
|
||||
if(TARGET PThreads4W::PThreads4W)
|
||||
target_link_libraries(toxcore PThreads4W::PThreads4W)
|
||||
else()
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(toxcore Threads::Threads)
|
||||
endif()
|
||||
|
||||
add_executable(DHT_Bootstrap EXCLUDE_FROM_ALL
|
||||
${TOX_DIR}other/DHT_bootstrap.c
|
||||
|
Reference in New Issue
Block a user