summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--appveyor.yml10
-rw-r--r--cmake/Dependencies.cmake19
2 files changed, 24 insertions, 5 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 5add5f31..8c351236 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,6 +1,12 @@
1install: 1install:
2- curl https://download.libsodium.org/libsodium/releases/libsodium-1.0.11-msvc.zip -o libsodium-1.0.11-msvc.zip 2- mkdir libsodium && cd libsodium
3- unzip libsodium-1.0.11-msvc.zip 3- curl https://download.libsodium.org/libsodium/releases/libsodium-1.0.11-msvc.zip -o libsodium.zip
4- unzip libsodium.zip
5- cd ..
6- mkdir pthreads-win32 && cd pthreads-win32
7- curl ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip -o pthreads.zip
8- unzip pthreads.zip
9- cd ..
4 10
5before_build: 11before_build:
6- cmake . -DBOOTSTRAP_DAEMON=OFF -DENABLE_SHARED=OFF 12- cmake . -DBOOTSTRAP_DAEMON=OFF -DENABLE_SHARED=OFF
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
index 338a4193..240ca2aa 100644
--- a/cmake/Dependencies.cmake
+++ b/cmake/Dependencies.cmake
@@ -40,17 +40,30 @@ pkg_use_module(SNDFILE sndfile )
40############################################################################### 40###############################################################################
41 41
42if(NOT LIBSODIUM_FOUND) 42if(NOT LIBSODIUM_FOUND)
43 include_directories(include) 43 include_directories(libsodium/include)
44 find_library(LIBSODIUM_LIBRARIES 44 find_library(LIBSODIUM_LIBRARIES
45 NAMES 45 NAMES
46 sodium 46 sodium
47 libsodium 47 libsodium
48 PATHS 48 PATHS
49 Win32/Release/v140/static 49 libsodium/Win32/Release/v140/static
50 x64/Release/v140/static 50 libsodium/x64/Release/v140/static
51 ) 51 )
52 if(LIBSODIUM_LIBRARIES) 52 if(LIBSODIUM_LIBRARIES)
53 set(LIBSODIUM_FOUND TRUE) 53 set(LIBSODIUM_FOUND TRUE)
54 endif() 54 endif()
55 message("libsodium: ${LIBSODIUM_LIBRARIES}") 55 message("libsodium: ${LIBSODIUM_LIBRARIES}")
56endif() 56endif()
57
58if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") AND CMAKE_USE_WIN32_THREADS_INIT)
59 include_directories(pthreads-win32/Pre-built.2/include)
60 find_library(CMAKE_THREAD_LIBS_INIT
61 NAMES
62 pthreadVC2
63 PATHS
64 pthreads-win32/Pre-built.2/lib/x86
65 pthreads-win32/Pre-built.2/lib/x64
66 )
67 add_definitions(-DHAVE_STRUCT_TIMESPEC)
68 message("libpthreads: ${CMAKE_THREAD_LIBS_INIT}")
69endif()