- 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
pull/1/head
aramis_acg 2011-04-03 11:21:34 +00:00
parent 06ef45ba12
commit 4bde6808b2
2 changed files with 10 additions and 1 deletions

View File

@ -50,6 +50,15 @@ ELSE ( ENABLE_BOOST_WORKAROUND )
ENDIF ( 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/ ) ADD_SUBDIRECTORY( code/ )
SET ( BUILD_ASSIMP_TOOLS ON CACHE BOOL SET ( BUILD_ASSIMP_TOOLS ON CACHE BOOL
"If the supplementary tools for Assimp are built in addition to the library." "If the supplementary tools for Assimp are built in addition to the library."

View File

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