From aba32d652ff469da6dec494d4c28a6f00b889b47 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 7 Jan 2020 17:08:53 -0800 Subject: [PATCH] find_package tcl again --- CMakeLists.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 78e9ef09..2d244f21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -508,13 +508,14 @@ add_custom_command(OUTPUT ${STA_TCL_INIT} # ################################################################ -if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") - # OSX tcl is deprecated and prints a warning, so look for a user installed - # version before using the system version. - include(FindTcl) -else() - find_package(TCL REQUIRED) -endif() +# OSX tcl is deprecated and prints a warning, so look for a user installed +# version before using the system version. +# I tried to override the library search order instead but failed. +# CMAKE_FIND_FRAMEWORK LAST bypasses the version in the framework directory +# but not the one in /usr/lib. +# This calls cmake/FindTCL.cmake +# Do not use REQUIRED because it also requires TK. +find_package(TCL) # Zlib include(FindZLIB)