From 81214699ae494706b850c67dde1a345f470cb89c Mon Sep 17 00:00:00 2001 From: Joseph Davies Date: Fri, 25 Apr 2014 21:56:23 -0700 Subject: [PATCH] Fix scope on preprocessor variables for Max plugin. plAudioCore needs to know whether we intend to build the plugin, so the change introduced in 978edc1 was causing compilation to fail when building the plugin. This moves detection and definition back into the root CMakeList, but preserves the behavior of only looking for the SDK if needed. --- CMakeLists.txt | 6 ++++++ Sources/Tools/CMakeLists.txt | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b01d767..3e20c18f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,6 +100,12 @@ option(PLASMA_BUILD_RESOURCE_DAT "Do we want to build resource.dat?" ON) option(PLASMA_BUILD_LAUNCHER "Do we want to build plUruLauncher?" ON) option(PLASMA_BUILD_TOOLS "Do we want to build the Plasma tools?" ON) +option(3dsm_BUILD_PLUGIN "Do we want to build the 3ds Max plugin?" OFF) +if(3dsm_BUILD_PLUGIN) + find_package(MaxSDK REQUIRED) + add_definitions(-DBUILDING_MAXPLUGIN) +endif(3dsm_BUILD_PLUGIN) + option(USE_VLD "Build and link with Visual Leak Detector (MSVC only)" OFF) if(USE_VLD) add_definitions(-DUSE_VLD) diff --git a/Sources/Tools/CMakeLists.txt b/Sources/Tools/CMakeLists.txt index b4e4c205..8bdc2fb3 100644 --- a/Sources/Tools/CMakeLists.txt +++ b/Sources/Tools/CMakeLists.txt @@ -8,12 +8,7 @@ if(PLASMA_BUILD_TOOLS) endif() # Max Stuff goes below here... -option(3dsm_BUILD_PLUGIN "Do we want to build the 3ds Max plugin?" OFF) if(3dsm_BUILD_PLUGIN) - find_package(MaxSDK REQUIRED) - add_definitions(-DBUILDING_MAXPLUGIN) - add_definitions(-DMAXPLUGINCODE) - add_subdirectory(MaxComponent) add_subdirectory(MaxConvert) add_subdirectory(MaxExport)