From fb7729aaaf5c36f059c389b103126c2b039280b6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 13 Dec 2016 11:54:33 +1100 Subject: [PATCH] CMake: fix for SuperLU It wasn't possible to use a custom superlu path. - Added "superlu" onto the end of SUPERLU_INCLUDE_DIR - Wasn't using SUPERLU_INCLUDE_DIR, instead used hard-coded path. Now use SUPERLU_INCLUDE_DIR on Linux, leave windows and macOS as-is with notice. --- toonz/sources/CMakeLists.txt | 1 - toonz/sources/tnzext/CMakeLists.txt | 17 +++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt index bddb3f9f..0860a640 100644 --- a/toonz/sources/CMakeLists.txt +++ b/toonz/sources/CMakeLists.txt @@ -288,7 +288,6 @@ elseif(UNIX) find_package(GLEW) find_package(SuperLU REQUIRED) - set(SUPERLU_INCLUDE_DIR ${SUPERLU_INCLUDE_DIR}/superlu) set(SUPERLU_LIB ${SUPERLU_LIBRARY}) find_package(JPEG REQUIRED) diff --git a/toonz/sources/tnzext/CMakeLists.txt b/toonz/sources/tnzext/CMakeLists.txt index ac821122..064afd06 100644 --- a/toonz/sources/tnzext/CMakeLists.txt +++ b/toonz/sources/tnzext/CMakeLists.txt @@ -94,10 +94,19 @@ if(APPLE) find_library(ACCE_LIB Accelerate) endif() -include_directories( - SYSTEM - ${SDKROOT}/superlu/SuperLU_4.1/SRC -) +if(WIN32 OR APPLE) + # Warning, this looks wrong, + # should _only_ use SUPERLU_INCLUDE_DIR, for now do this with Linux. + include_directories( + SYSTEM + ${SDKROOT}/superlu/SuperLU_4.1/SRC + ) +else() + include_directories( + SYSTEM + ${SUPERLU_INCLUDE_DIR} + ) +endif() if(WIN32) target_link_libraries(tnzext