From 56992b099eb5b77adfca15678ada9ec4011d8dd3 Mon Sep 17 00:00:00 2001 From: Robin Linden Date: Thu, 14 May 2020 01:50:43 +0200 Subject: Add support for the conan C/C++ package manager * Don't overwrite the CMAKE_MODULE_PATH * Allow linking libsodium statically with MSVC * Allow finding libsodium the normal way on MSVC * Allow using pthreads4w for pthreads on MSVC * Fall back to find_package if pkg_find_module fails * Don't pass incompatible compile flags to MSVC * Also try to find Opus and libvpx using their canonical names * Support building using conan * Allow pkg_use_module to take a list of libraries to look for * Build for Windows on Appveyor using conan --- appveyor.yml | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) (limited to 'appveyor.yml') diff --git a/appveyor.yml b/appveyor.yml index 08687595..f4a5970f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,35 +1,23 @@ --- cache: - - '%APPDATA%\downloads' + - '%USERPROFILE%\.conan' install: - # TODO(iphydf): Remove this when appveyor gets curl back, which it should - # have according to https://www.appveyor.com/docs/how-to/download-file/. - - 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.18-msvc.zip -o %APPDATA%\downloads\libsodium.zip - - unzip %APPDATA%\downloads\libsodium.zip - - cd .. - # pthreads-win32 - - 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 ../.. + - set PATH=C:\Python38-x64\Scripts;%PATH% + - py -3 -m pip install conan + - conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan before_build: - - cmake -B_build -H. -DBOOTSTRAP_DAEMON=OFF -DENABLE_SHARED=OFF -DBUILD_TOXAV=OFF -DTEST_TIMEOUT_SECONDS=120 -DAUTOTEST=ON + - ps: | + mkdir _build + cd _build + conan install .. -build: - project: _build/INSTALL.vcxproj +build_script: + - conan build .. --configure --build test_script: - - copy third_party\pthreads-win32\Pre-built.2\dll\x86\*.dll _build - - copy third_party\libsodium\Win32\Debug\v140\dynamic\libsodium.dll _build - - cd _build # TODO(iphydf): Tests are unstable and slow on windows at the moment. - - ctest -j50 --output-on-failure -C Debug & + - set CONAN_CPU_COUNT=50 + - conan build .. --test & exit 0 -- cgit v1.2.3