瀏覽代碼

# 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
aramis_acg 14 年之前
父節點
當前提交
1204c8cdaf
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      CMakeLists.txt

+ 2 - 2
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