From 9d7efd34efe3ee2afbe59a141e3d5fb4ac3734c7 Mon Sep 17 00:00:00 2001 From: Jeremy Bernstein Date: Thu, 19 Aug 2021 17:36:10 +0200 Subject: [PATCH] use C74_LIBRARY_OUTPUT_DIRECTORY rather than the CMAKE_LIBRARY_OUTPUT_DIRECTORY variable to specify an alternative library directory to prevent inadvertent setting by a higher-level cmake script --- script/max-pretarget.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/max-pretarget.cmake b/script/max-pretarget.cmake index f7a65cb..89a8e55 100644 --- a/script/max-pretarget.cmake +++ b/script/max-pretarget.cmake @@ -62,7 +62,9 @@ if (APPLE) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE STRING "Minimum OS X deployment version" FORCE) endif () -if (NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY) +if (DEFINED C74_LIBRARY_OUTPUT_DIRECTORY) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${C74_LIBRARY_OUTPUT_DIRECTORY}") +else () if (NOT DEFINED C74_BUILD_MAX_EXTENSION) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../../externals") else ()