From 4bde6808b29a000a47ca375686de497ed9ca10ad Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Sun, 3 Apr 2011 11:21:34 +0000 Subject: [PATCH] - 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 --- CMakeLists.txt | 9 +++++++++ code/CMakeLists.txt | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b46fce36..a0b78c2a4 100644 --- a/CMakeLists.txt +++ b/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." diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index d9b30dc9b..ad4da600c 100644 --- a/code/CMakeLists.txt +++ b/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 )