Parcourir la source

- CMakeLists: turn on export functionality by default, offer NO_EXPORT option to turn it off.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@931 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg il y a 14 ans
Parent
commit
4bde6808b2
2 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 9 0
      CMakeLists.txt
  2. 1 1
      code/CMakeLists.txt

+ 9 - 0
CMakeLists.txt

@@ -50,6 +50,15 @@ ELSE ( ENABLE_BOOST_WORKAROUND )
 ENDIF ( ENABLE_BOOST_WORKAROUND )
 
 
+SET ( NO_EXPORT OFF CACHE BOOL
+	"Disable Assimp's export functionality." 
+)
+
+IF ( NO_EXPORT )
+	ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT)
+	MESSAGE( STATUS "Build an import-only version of Assimp." )
+ENDIF( NO_EXPORT )
+
 ADD_SUBDIRECTORY( code/ )
 SET ( BUILD_ASSIMP_TOOLS ON CACHE BOOL
 	"If the supplementary tools for Assimp are built in addition to the library."

+ 1 - 1
code/CMakeLists.txt

@@ -749,7 +749,7 @@ ADD_LIBRARY( assimp SHARED
 	${COMPILER_HEADERS}
 )
 
-ADD_DEFINITIONS( -DASSIMP_BUILD_DLL_EXPORT -DASSIMP_BUILD_NO_EXPORT )
+ADD_DEFINITIONS( -DASSIMP_BUILD_DLL_EXPORT )
 
 if ( MSVC80 OR MSVC90 OR MSVC10 )
 	ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )