mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fix for windows dynamic libraries.
This commit is contained in:
parent
80cc32a79d
commit
5da85c582d
|
@ -91,6 +91,9 @@ set(toxcore_PKGCONFIG_LIBS)
|
|||
add_module(toxcrypto
|
||||
toxcore/crypto_core.c)
|
||||
target_link_modules(toxcrypto ${LIBSODIUM_LIBRARIES})
|
||||
if(WIN32)
|
||||
target_link_modules(toxcrypto ws2_32) # for htonl
|
||||
endif()
|
||||
|
||||
# LAYER 2: Basic networking
|
||||
# -------------------------
|
||||
|
@ -204,8 +207,9 @@ target_link_modules(toxencryptsave toxcore)
|
|||
#
|
||||
################################################################################
|
||||
|
||||
add_test(format_test
|
||||
${CMAKE_SOURCE_DIR}/other/astyle/format-source "${CMAKE_SOURCE_DIR}")
|
||||
add_test(
|
||||
NAME format_test
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/other/astyle/format-source "${CMAKE_SOURCE_DIR}")
|
||||
|
||||
function(auto_test target)
|
||||
if(CHECK_FOUND)
|
||||
|
@ -215,7 +219,7 @@ function(auto_test target)
|
|||
toxav
|
||||
toxencryptsave
|
||||
${CHECK_LIBRARIES})
|
||||
add_test(${target} auto_${target})
|
||||
add_test(NAME ${target} COMMAND auto_${target})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
|
|
@ -24,10 +24,12 @@
|
|||
#include <time.h>
|
||||
|
||||
#include "../toxcore/tox.h"
|
||||
#include "../toxcore/util.h"
|
||||
|
||||
#include "helpers.h"
|
||||
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined (WIN32)
|
||||
#include <windows.h>
|
||||
#define c_sleep(x) Sleep(1*x)
|
||||
#else
|
||||
#include <unistd.h>
|
||||
|
|
Loading…
Reference in New Issue
Block a user