Look for dependencies in third_party/

This commit is contained in:
Robin Lindén 2018-02-11 13:38:40 +01:00
parent 2e74db5447
commit 0647c2c5bc
No known key found for this signature in database
GPG Key ID: 601A604B7E605776
4 changed files with 11 additions and 12 deletions

View File

@ -144,7 +144,7 @@ In addition to meeting the [requirements](#requirements), you need a version of
You must also ensure that the msvc versions of dependencies you're using are placed in the correct folders.
For libsodium that is `c-toxcore/libsodium`, and for pthreads-w32, it's `c-toxcore/pthreads-win32`
For libsodium that is `c-toxcore/third_party/libsodium`, and for pthreads-w32, it's `c-toxcore/third_party/pthreads-win32`
Once all of this is done, from the **Developer Command Prompt for VS**, simply run

View File

@ -7,6 +7,7 @@ install:
- choco install curl
- refreshenv
- if not exist %APPDATA%\downloads mkdir %APPDATA%\downloads
- cd third_party
# libsodium
- mkdir libsodium && cd libsodium
- if not exist %APPDATA%\downloads\libsodium.zip curl -L https://download.libsodium.org/libsodium/releases/libsodium-1.0.12-msvc.zip -o %APPDATA%\downloads\libsodium.zip
@ -16,7 +17,7 @@ install:
- mkdir pthreads-win32 && cd pthreads-win32
- if not exist %APPDATA%\downloads\pthreads.zip curl -L ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip -o %APPDATA%\downloads\pthreads.zip
- unzip %APPDATA%\downloads\pthreads.zip
- cd ..
- cd ../..
before_build:
- cmake . -DBOOTSTRAP_DAEMON=OFF -DENABLE_SHARED=OFF -DBUILD_TOXAV=OFF

View File

@ -33,8 +33,8 @@ pkg_use_module(SNDFILE sndfile )
# :: For MSVC Windows builds.
#
# These require specific installation paths of dependencies:
# - libsodium in libsodium/Win32/Release/v140/dynamic
# - pthreads in pthreads-win32/Pre-built.2
# - libsodium in third-party/libsodium/Win32/Release/v140/dynamic
# - pthreads in third-party/pthreads-win32/Pre-built.2
#
###############################################################################
@ -44,11 +44,11 @@ if(MSVC)
find_library(LIBSODIUM_LIBRARIES
NAMES sodium libsodium
PATHS
"libsodium/Win32/Release/v140/dynamic"
"libsodium/x64/Release/v140/dynamic"
"third_party/libsodium/Win32/Release/v140/dynamic"
"third_party/libsodium/x64/Release/v140/dynamic"
)
if(LIBSODIUM_LIBRARIES)
include_directories("libsodium/include")
include_directories("third_party/libsodium/include")
set(LIBSODIUM_FOUND TRUE)
message("libsodium: ${LIBSODIUM_LIBRARIES}")
else()
@ -61,11 +61,11 @@ if(MSVC)
find_library(CMAKE_THREAD_LIBS_INIT
NAMES pthreadVC2
PATHS
"pthreads-win32/Pre-built.2/lib/x86"
"pthreads-win32/Pre-built.2/lib/x64"
"third_party/pthreads-win32/Pre-built.2/lib/x86"
"third_party/pthreads-win32/Pre-built.2/lib/x64"
)
if(CMAKE_THREAD_LIBS_INIT)
include_directories("pthreads-win32/Pre-built.2/include")
include_directories("third_party/pthreads-win32/Pre-built.2/include")
add_definitions(-DHAVE_STRUCT_TIMESPEC)
message("libpthreads: ${CMAKE_THREAD_LIBS_INIT}")
else()

View File

@ -2,5 +2,3 @@
All toxcore dependencies you want to build yourself should end up here, not in
the source root. This directory is exempt from code style checks.
TODO(iphydf): Change appveyor.yml to unpack dependencies here.