summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMaxim Biro <nurupo.contributions@gmail.com>2017-02-19 19:54:49 -0500
committerMaxim Biro <nurupo.contributions@gmail.com>2017-02-20 06:55:36 -0500
commit227b436339f98a36614087945f20096609048a5a (patch)
treec879fbdf58b2ff194fed014cd60357cf31aa2cff /cmake
parentbbb979d6ef2299834cb38932a2d395eeaf119ff0 (diff)
Fix pthreads in AppVeyor build
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Dependencies.cmake19
1 files changed, 16 insertions, 3 deletions
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()