# CMake: make sure -fvisibility=hidden is only used with gcc.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1069 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/2/head
aramis_acg 2011-08-22 20:52:02 +00:00
parent ce08069399
commit 1204c8cdaf
1 changed files with 2 additions and 2 deletions

View File

@ -17,6 +17,8 @@ set(CPACK_COMPONENTS_ALL assimp-bin libassimp${ASSIMP_VERSION_MAJOR} assimp-dev)
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-fPIC) # this is a very important switch and some libraries seem now to have it.... add_definitions(-fPIC) # this is a very important switch and some libraries seem now to have it....
## hide all not-exported symbols
add_definitions( -fvisibility=hidden )
endif() endif()
INCLUDE (FindPkgConfig) INCLUDE (FindPkgConfig)
@ -100,8 +102,6 @@ IF ( NO_EXPORT )
MESSAGE( STATUS "Build an import-only version of Assimp." ) MESSAGE( STATUS "Build an import-only version of Assimp." )
ENDIF( NO_EXPORT ) ENDIF( NO_EXPORT )
## hide all not-exported symbols
ADD_DEFINITIONS( -fvisibility=hidden )
ADD_SUBDIRECTORY( code/ ) ADD_SUBDIRECTORY( code/ )
SET ( BUILD_ASSIMP_TOOLS ON CACHE BOOL SET ( BUILD_ASSIMP_TOOLS ON CACHE BOOL