Use conan in travis
This commit is contained in:
parent
7c044c8e87
commit
960335faea
@ -10,6 +10,11 @@ os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- os: osx
|
||||
compiler: gcc
|
||||
|
||||
env:
|
||||
#- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release" # Default
|
||||
#- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF" # Default (Debug mode + static libs)
|
||||
|
||||
@ -4,9 +4,25 @@ set -x
|
||||
|
||||
if [[ "$(uname -s)" == 'Linux' ]]; then
|
||||
sudo apt-get install cmake zlib1g-dev libssh-dev libcurl4-openssl-dev gettext libexpat1-dev
|
||||
sudo apt-get install python-pip
|
||||
sudo pip install virtualenv
|
||||
else
|
||||
brew update
|
||||
brew install expat gettext libssh
|
||||
brew install pyenv-virtualenv
|
||||
# By default it already has cmake 3.6.2
|
||||
fi
|
||||
|
||||
virtualenv conan
|
||||
source conan/bin/activate
|
||||
pip install conan
|
||||
conan --version
|
||||
conan remote add conan-pix4d https://api.bintray.com/conan/pix4d/conan
|
||||
mkdir -p ~/.conan/profiles
|
||||
|
||||
if [[ "$(uname -s)" == 'Linux' ]]; then
|
||||
printf "os=Linux\narch=x86_64\ncompiler=gcc\ncompiler.version=4.8\nbuild_type=Release\n" > ~/.conan/profiles/release
|
||||
else
|
||||
printf "os=Macos\narch=x86_64\ncompiler=apple-clang\ncompiler.version=7.3\nbuild_type=Release\n" > ~/.conan/profiles/release
|
||||
fi
|
||||
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
set -e
|
||||
set -x
|
||||
|
||||
source conan/bin/activate
|
||||
mkdir build && cd build
|
||||
conan install .. --build missing --profile release
|
||||
cmake ${CMAKE_OPTIONS} ..
|
||||
cmake -DCMAKE_INSTALL_PREFIX=install ..
|
||||
make -j
|
||||
|
||||
@ -3,6 +3,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/config/")
|
||||
|
||||
# Check if the conan file exist to find the dependencies
|
||||
if (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
set(USING_CONAN ON)
|
||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
conan_set_find_paths()
|
||||
endif()
|
||||
|
||||
@ -215,10 +215,9 @@ if (EXIV2_ENABLE_WEBREADY)
|
||||
|
||||
if( EXIV2_ENABLE_CURL )
|
||||
target_include_directories(exiv2lib SYSTEM PUBLIC ${CURL_INCLUDE_DIR} )
|
||||
# TODO : There should not be needed to make this difference. Improve LIBCURL conan recipe
|
||||
if (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||
target_link_libraries( exiv2lib PUBLIC ${CURL_LIBRARY})
|
||||
#target_link_libraries( exiv2lib PUBLIC ${CONAN_LIBS_LIBCURL})
|
||||
|
||||
if (USING_CONAN)
|
||||
target_link_libraries( exiv2lib PUBLIC ${CONAN_LIBS_LIBCURL})
|
||||
target_compile_definitions(exiv2lib PUBLIC ${CONAN_COMPILE_DEFINITIONS_LIBCURL})
|
||||
else()
|
||||
target_link_libraries( exiv2lib PUBLIC ${CURL_LIBRARIES})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user