From 1204c8cdafa53a7bcbd9029070a457bb5e3b798a Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Mon, 22 Aug 2011 20:52:02 +0000 Subject: [PATCH] # 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 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fa5043c4..ab5de8875 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) 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() INCLUDE (FindPkgConfig) @@ -100,8 +102,6 @@ IF ( NO_EXPORT ) MESSAGE( STATUS "Build an import-only version of Assimp." ) ENDIF( NO_EXPORT ) -## hide all not-exported symbols -ADD_DEFINITIONS( -fvisibility=hidden ) ADD_SUBDIRECTORY( code/ ) SET ( BUILD_ASSIMP_TOOLS ON CACHE BOOL