From 978edc142382903502d672ce6e1a9cad12d2d628 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Fri, 11 Apr 2014 23:07:24 -0700 Subject: [PATCH] Only try to find the Max SDK if it was requested (and show the option to try to build it always) --- CMakeLists.txt | 3 +-- Sources/Tools/CMakeLists.txt | 3 +++ cmake/FindMaxSDK.cmake | 7 +------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5f4de9f..27cb6bba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,9 +52,8 @@ if(WIN32) find_package(Freetype) endif(WIN32) -find_package(MaxSDK) #TODO: Only find this if we are building PlasmaMax find_package(Bink) #TODO: Find Bink, but don't require it if plPipeline isn't built... -# Or better yet, just eliminate bink altogether + # Or better yet, just eliminate bink altogether include(PrecompiledHeader) #Precompiled Header helper macros # libCurl isn't smart enough to detect this for us, so we have to configure it ourselves diff --git a/Sources/Tools/CMakeLists.txt b/Sources/Tools/CMakeLists.txt index d5ba6f6e..b4e4c205 100644 --- a/Sources/Tools/CMakeLists.txt +++ b/Sources/Tools/CMakeLists.txt @@ -8,7 +8,10 @@ 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) diff --git a/cmake/FindMaxSDK.cmake b/cmake/FindMaxSDK.cmake index 3a059d06..fe595261 100644 --- a/cmake/FindMaxSDK.cmake +++ b/cmake/FindMaxSDK.cmake @@ -87,9 +87,4 @@ if (3dsm_FOUND) if(NOT 3dsm_FIND_QUIETLY) message(STATUS "Found 3ds Max SDK: ${3dsm_PATH}") endif() - - option(3dsm_BUILD_PLUGIN "Do we want to build the 3ds Max plugin?" OFF) - if (3dsm_BUILD_PLUGIN) - add_definitions(-DBUILDING_MAXPLUGIN) - endif() -endif() \ No newline at end of file +endif()