From 17f5b953717dfc8b03d2893013a991f1b7c5e092 Mon Sep 17 00:00:00 2001 From: Clifford Yapp <238416+starseeker@users.noreply.github.com> Date: Fri, 20 Sep 2024 14:10:14 -0400 Subject: [PATCH] Add cad_enable check for Tk --- tk/CMakeLists.txt | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/tk/CMakeLists.txt b/tk/CMakeLists.txt index fea0aac5..b80b363e 100644 --- a/tk/CMakeLists.txt +++ b/tk/CMakeLists.txt @@ -1,15 +1,28 @@ # By the time we get here, we have run FindTCL and should know # if we have TK. -if (NOT DISABLE_TCL) - if (NOT TK_LIBRARY OR TARGET TCL_BLD) - set(TK_DO_BUILD 1) - else (NOT TK_LIBRARY OR TARGET TCL_BLD) +if (USE_BRLCAD) + + # Decide if we're using Tk + cad_enable(TK "archer;mged;bwish;rtwizard;brlman") + + if (DISABLE_TK) + set(TK_DO_BUILD 0) + endif (DISABLE_TK) + +else (USE_BRLCAD) + + if (NOT DISABLE_TCL) + if (NOT TK_LIBRARY OR TARGET TCL_BLD) + set(TK_DO_BUILD 1) + else (NOT TK_LIBRARY OR TARGET TCL_BLD) + set(TK_DO_BUILD 0) + endif (NOT TK_LIBRARY OR TARGET TCL_BLD) + else (NOT DISABLE_TCL) set(TK_DO_BUILD 0) - endif (NOT TK_LIBRARY OR TARGET TCL_BLD) -else (NOT DISABLE_TCL) - set(TK_DO_BUILD 0) -endif (NOT DISABLE_TCL) + endif (NOT DISABLE_TCL) + +endif(USE_BRLCAD) if (TK_DO_BUILD)