Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis support #29

Merged
merged 3 commits into from
Aug 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 12 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,21 @@
language: cpp

sudo: false
sudo: required

addons:
apt:
packages:
- cmake
- zlib1g-dev
- libssh-dev
- libssh
- libcurl4-openssl-dev
- gettext
sources:
- kalakris-cmake

compiler:
- gcc
- clang

before_install:
- echo $LANG
- echo $LC_ALL
- if [ $TRAVIS_OS_NAME == osx ]; then brew update && brew install libssh curl; fi
- rvm use $RVM --install --binary --fuzzy
- gem update --system
# - gem --version

script:
- cmake -DCMAKE_INSTALL_PREFIX=..\dist -EXIV2_ENABLE_NLS=ON -DEXIV2_ENABLE_CURL=OFF -DEXIV2_ENABLE_SSH=OFF .
- cmake --build . && cmake --build . --target install
- cmake -DCMAKE_INSTALL_PREFIX=..\dist2 -EXIV2_ENABLE_NLS=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_ENABLE_SSH=ON -DEXIV2_ENABLE_WEBREADY=ON .
- cmake --build . && cmake --build . --target install

notifications:
email: false

os:
- linux
- osx
- osx

env:
- CMAKE_OPTIONS="" # Default
- CMAKE_OPTIONS="-DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON" # All enabled
- CMAKE_OPTIONS="-DEXIV2_ENABLE_XMP=OFF -DEXIV2_ENABLE_NLS=OFF -DEXIV2_ENABLE_LENSDATA=OFF" # All disabled
- CMAKE_OPTIONS="-DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=OFF -DEXIV2_ENABLE_SSH=OFF" # WebReady without SSH nor CURL


install: ./.travis/install.sh
script: ./.travis/run.sh
12 changes: 12 additions & 0 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -e
set -x

if [[ "$(uname -s)" == 'Linux' ]]; then
sudo apt-get install cmake zlib1g-dev libssh-dev libcurl4-openssl-dev gettext libexpat1-dev
else
brew update
brew install expat gettext libssh
# By default it already has cmake 3.6.2
fi

8 changes: 8 additions & 0 deletions .travis/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -e
set -x

mkdir build && cd build
cmake ${CMAKE_OPTIONS} ..
make -j
2 changes: 2 additions & 0 deletions config/generateConfigFile.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include(CheckIncludeFile)

# Note that the scope of the EXV_ variables in local
if (${EXIV2_ENABLE_WEBREADY})
set(EXV_USE_SSH ${EXIV2_ENABLE_SSH})
Expand Down
2 changes: 1 addition & 1 deletion samples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ if (MSVC)
target_sources(metacopy PRIVATE ../src/getopt_win32.c)
endif()

if( EXIV2_ENABLE_LIBXMP )
if( EXIV2_ENABLE_XMP )
add_executable( geotag geotag.cpp)
target_link_libraries( geotag PRIVATE exiv2lib ${ZLIB_LIBRARIES})
install( TARGETS geotag RUNTIME DESTINATION bin)
Expand Down
7 changes: 5 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,10 @@ if ( UNIX AND CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
set (FREEBSD 1)
endif()

target_include_directories(exiv2lib PRIVATE ${CMAKE_SOURCE_DIR}/xmpsdk/include)
if ( EXIV2_ENABLE_XMP )
target_include_directories(exiv2lib PRIVATE ${CMAKE_SOURCE_DIR}/xmpsdk/include)
endif ()

# TODO : We should not include include/exiv2 but only include !!!
target_include_directories(exiv2lib PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include/exiv2>
Expand Down Expand Up @@ -233,7 +236,7 @@ else()
target_link_libraries( exiv2lib PUBLIC ${CURL_LIBRARIES} ${SSH_LIBRARIES})
endif()

if( EXIV2_ENABLE_LIBXMP )
if( EXIV2_ENABLE_XMP AND EXIV2_ENABLE_LIBXMP )
TARGET_LINK_LIBRARIES( exiv2lib PUBLIC xmp )
ENDIF()

Expand Down