diff --git a/src/she/CMakeLists.txt b/src/she/CMakeLists.txt index 47c3dae6c..d6b59088b 100644 --- a/src/she/CMakeLists.txt +++ b/src/she/CMakeLists.txt @@ -69,13 +69,17 @@ if(USE_SKIA_BACKEND) add_definitions(-DSK_SAMPLES_FOR_X) endif() - if(CMAKE_BUILD_TYPE STREQUAL Debug) - set(SKIA_BUILD_OUT_DIR "${SKIA_DIR}/out/Debug") + if(NOT SKIA_DIR) + set(SKIA_OUT_DIR "" CACHE PATH "Skia output directory") else() - set(SKIA_BUILD_OUT_DIR "${SKIA_DIR}/out/Release") + if(CMAKE_BUILD_TYPE STREQUAL Debug) + set(SKIA_OUT_DIR "${SKIA_DIR}/out/Debug" CACHE PATH "Skia output directory") + else() + set(SKIA_OUT_DIR "${SKIA_DIR}/out/Release" CACHE PATH "Skia output directory") + endif() endif() - find_library(SKIA_LIBRARY skia PATH "${SKIA_BUILD_OUT_DIR}") + find_library(SKIA_LIBRARY skia PATH "${SKIA_OUT_DIR}") if(WIN32) find_library(SKIA_OPENGL_LIBRARY opengl32) else()