Merge pull request #528 from arris69/Fix_static_and_shared_builds

add static flag for exe build if no shared build is requested
pull/531/head
Alexander Gessler 2015-04-08 21:08:56 +02:00
commit d1ea4405ed
2 changed files with 11 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,12 @@
cmake_minimum_required( VERSION 2.8 )
PROJECT( Assimp )
option(BUILD_SHARED_LIBS "Build package with shared libraries." OFF)
if(NOT BUILD_SHARED_LIBS)
#set(CMAKE_EXE_LINKER_FLAGS "-static")
set(LINK_SEARCH_START_STATIC 1)
endif(NOT BUILD_SHARED_LIBS)
# Define here the needed parameters
set (ASSIMP_VERSION_MAJOR 3)
set (ASSIMP_VERSION_MINOR 1)