From df53ffe05bdde9196d4e1e59fa2ea7b9b3e6505f Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Fri, 29 Oct 2021 15:50:34 +0200 Subject: [PATCH] fix finding tcl/tk stub libs on MacOS --- cmake/SuperBuild.cmake | 2 +- cmake/external_projects/tcltk.cmake | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake index 1880994b..c2d12adc 100644 --- a/cmake/SuperBuild.cmake +++ b/cmake/SuperBuild.cmake @@ -12,7 +12,7 @@ set (SUBPROJECT_ARGS LOG_DOWNLOAD ON LOG_BUILD ON LOG_INSTALL ON - LOG_CONFIGURE ON + LOG_CONFIGURE OFF LIST_SEPARATOR | PREFIX ${CMAKE_CURRENT_BINARY_DIR}/dependencies ) diff --git a/cmake/external_projects/tcltk.cmake b/cmake/external_projects/tcltk.cmake index c794004f..106defb2 100644 --- a/cmake/external_projects/tcltk.cmake +++ b/cmake/external_projects/tcltk.cmake @@ -114,6 +114,22 @@ if(APPLE) set(TK_LIBRARY ${CMAKE_INSTALL_PREFIX}/Contents/Frameworks/Tk.framework) set(TK_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/Contents/Frameworks/Tk.framework/Headers) + set(tcl_find_args + REQUIRED + NO_DEFAULT_PATH + NO_PACKAGE_ROOT_PATH + NO_CMAKE_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH + NO_CMAKE_FIND_ROOT_PATH + HINTS + ${CMAKE_INSTALL_PREFIX}/Contents/Frameworks/Tcl.framework + ${CMAKE_INSTALL_PREFIX}/Contents/Frameworks/Tk.framework + ) + find_library(TCL_STUB_LIBRARY NAMES tclstub85 tclstub8.5 tclstub86 tclstub8.6 ${tcl_find_args}) + find_library(TK_STUB_LIBRARY NAMES tkstub85 tkstub8.5 tkstub86 tkstub8.6 ${tcl_find_args}) + # # use system tcl/tk # if((${PYTHON_VERSION_STRING} VERSION_EQUAL "3.7") OR (${PYTHON_VERSION_STRING} VERSION_GREATER "3.7")) # # fetch tcl/tk sources to match the one used in Python 3.7