add static flag for exe build if no shared build is requested

pull/528/head
Ser Lev Arris 2015-04-07 08:20:27 +02:00
parent b5e3e18bf0
commit fb7661c430
2 changed files with 9 additions and 5 deletions

View File

@ -15,12 +15,12 @@ env:
matrix:
- LINUX=1 TRAVIS_NO_EXPORT=YES
- LINUX=1 TRAVIS_NO_EXPORT=NO
- LINUX=1 TRAVIS_STATIC_BUILD=ON
- LINUX=1 TRAVIS_STATIC_BUILD=OFF
- LINUX=1 SHARED_BUILD=ON
- LINUX=1 SHARED_BUILD=OFF
- WINDOWS=1 TRAVIS_NO_EXPORT=YES
- WINDOWS=1 TRAVIS_NO_EXPORT=NO
- WINDOWS=1 TRAVIS_STATIC_BUILD=ON
- WINDOWS=1 TRAVIS_STATIC_BUILD=OFF
- WINDOWS=1 SHARED_BUILD=ON
- WINDOWS=1 SHARED_BUILD=OFF
- ANDROID=1
language: cpp
@ -38,7 +38,7 @@ script:
elif [ $RESERVED ]; then
echo "Reserved condition" ;
else
cmake -G "Unix Makefiles" -DASSIMP_ENABLE_BOOST_WORKAROUND=YES -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -STATIC_BUILD=$TRAVIS_STATIC_BUILD ;
cmake -G "Unix Makefiles" -DASSIMP_ENABLE_BOOST_WORKAROUND=YES -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -DBUILD_SHARED_LIBS=$SHARED_BUILD ;
make ;
sudo make install ;
sudo ldconfig ;

View File

@ -1,6 +1,10 @@
cmake_minimum_required( VERSION 2.8 )
PROJECT( Assimp )
if(NOT BUILD_SHARED_LIBS)
set(CMAKE_EXE_LINKER_FLAGS "-static")
endif(NOT BUILD_SHARED_LIBS)
# Define here the needed parameters
set (ASSIMP_VERSION_MAJOR 3)
set (ASSIMP_VERSION_MINOR 1)