From 4310322a80489bb2373f362c6e18e633bd3ed414 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Barrette-LaPierre Date: Tue, 21 Feb 2017 18:05:39 -0300 Subject: [PATCH] Adding cmake's conan.io support + appveyor's support for conan.io --- CMakeLists.txt | 6 ++++++ appveyor.yml | 19 +++++++++++++++---- conanfile.txt | 5 +++++ 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 conanfile.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 6754ed3..486d0c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,12 @@ else() cmake_minimum_required(VERSION 3.0) endif() +# Conan.io integration +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake) + include(${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake) + conan_basic_setup() +endif() + set(CMAKE_CXX_STANDARD 11) # C++11... set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required... set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11 diff --git a/appveyor.yml b/appveyor.yml index 72eb6fd..32ebb69 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,27 +5,38 @@ environment: - PRJ_GEN: "Visual Studio 11 2012 Win64" BDIR: msvc2012 PRJ_CFG: Release + PRJ_GEN_VERSION: 11 - PRJ_GEN: "Visual Studio 12 2013 Win64" BDIR: msvc2013 PRJ_CFG: Release + PRJ_GEN_VERSION: 12 - PRJ_GEN: "Visual Studio 14 2015 Win64" BDIR: msvc2015 PRJ_CFG: Release + PRJ_GEN_VERSION: 14 - PRJ_GEN: "Visual Studio 11 2012 Win64" BDIR: msvc2012 - PRJ_CFG: Release + PRJ_CFG: Debug + PRJ_GEN_VERSION: 11 - PRJ_GEN: "Visual Studio 12 2013 Win64" BDIR: msvc2013 - PRJ_CFG: Release + PRJ_CFG: Debug + PRJ_GEN_VERSION: 12 - PRJ_GEN: "Visual Studio 14 2015 Win64" BDIR: msvc2015 - PRJ_CFG: Release + PRJ_CFG: Debug + PRJ_GEN_VERSION: 14 install: - - cinst curl + - cmd: echo "Downloading conan..." + - cmd: set PATH=%PATH%;%PYTHON%/Scripts/ + - cmd: pip.exe install conan + - cmd: conan user # Create the conan data directory + - cmd: conan --version build_script: - mkdir build.%BDIR% + - conan install --build -s compiler="Visual Studio" -s compiler.version=%PRJ_GEN_VERSION% . - cd build.%BDIR% - cmake .. -G"%PRJ_GEN%" - cmake --build . --config %PRJ_CFG% --clean-first diff --git a/conanfile.txt b/conanfile.txt new file mode 100644 index 0000000..ece9ff0 --- /dev/null +++ b/conanfile.txt @@ -0,0 +1,5 @@ +[requires] +libcurl/7.50.3@lasote/stable + +[generators] +cmake