Revision: 75588
http://sourceforge.net/p/brlcad/code/75588
Author: starseeker
Date: 2020-04-23 21:17:15 +0000 (Thu, 23 Apr 2020)
Log Message:
-----------
Make it FindTCL.cmake's business to pick up the stub libraries as well.
Modified Paths:
--------------
brlcad/trunk/misc/CMake/FindTCL.cmake
brlcad/trunk/src/other/itcl3/CMakeLists.txt
brlcad/trunk/src/other/itk3/CMakeLists.txt
Modified: brlcad/trunk/misc/CMake/FindTCL.cmake
===================================================================
--- brlcad/trunk/misc/CMake/FindTCL.cmake 2020-04-23 20:57:46 UTC (rev
75587)
+++ brlcad/trunk/misc/CMake/FindTCL.cmake 2020-04-23 21:17:15 UTC (rev
75588)
@@ -21,6 +21,9 @@
TK_LIBRARY = path to Tk library (tk tk80 etc)
TK_INCLUDE_PATH = path to where tk.h can be found
TK_WISH = full path to the wish executable
+ TCL_STUB_LIBRARY = path to Tcl stub library
+ TK_STUB_LIBRARY = path to Tk stub library
+ TTK_STUB_LIBRARY = path to ttk stub library
#]=======================================================================]
@@ -157,6 +160,20 @@
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
+find_library(TCL_STUB_LIBRARY
+ NAMES
+ tclstub
+ tclstub${TK_LIBRARY_VERSION} tclstub${TCL_TCLSH_VERSION}
tclstub${TK_WISH_VERSION}
+ tclstub87 tclstub8.7
+ tclstub86 tclstub8.6
+ tclstub85 tclstub8.5
+ tclstub84 tclstub8.4
+ tclstub83 tclstub8.3
+ tclstub82 tclstub8.2
+ tclstub80 tclstub8.0
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+)
+
find_library(TK_LIBRARY
NAMES
tk
@@ -172,6 +189,31 @@
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
+find_library(TK_STUB_LIBRARY
+ NAMES
+ tkstub
+ tkstub${TCL_LIBRARY_VERSION} tkstub${TCL_TCLSH_VERSION}
tkstub${TK_WISH_VERSION}
+ tkstub87 tkstub8.7
+ tkstub86 tkstub8.6
+ tkstub85 tkstub8.5
+ tkstub84 tkstub8.4
+ tkstub83 tkstub8.3
+ tkstub82 tkstub8.2
+ tkstub80 tkstub8.0
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+)
+
+find_library(TTK_STUB_LIBRARY
+ NAMES
+ ttkstub
+ ttkstub${TCL_LIBRARY_VERSION} ttkstub${TCL_TCLSH_VERSION}
ttkstub${TK_WISH_VERSION}
+ ttkstub88 ttkstub8.8
+ ttkstub87 ttkstub8.7
+ ttkstub86 ttkstub8.6
+ ttkstub85 ttkstub8.5
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+)
+
CMAKE_FIND_FRAMEWORKS(Tcl)
CMAKE_FIND_FRAMEWORKS(Tk)
@@ -236,25 +278,28 @@
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL
- REQUIRED_VARS TCL_LIBRARY TCL_INCLUDE_PATH TCL_TCLSH
+ REQUIRED_VARS TCL_LIBRARY TCL_STUB_LIBRARY TCL_INCLUDE_PATH TCL_TCLSH
VERSION_VAR TCLSH_VERSION_STRING)
set(FPHSA_NAME_MISMATCHED 1)
set(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
set(TCLTK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCLTK
- REQUIRED_VARS TCL_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY TK_INCLUDE_PATH)
+ REQUIRED_VARS TCL_LIBRARY TCL_STUB_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY
TK_STUB_LIBRARY TK_INCLUDE_PATH)
set(TK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
set(TK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TK
- REQUIRED_VARS TK_LIBRARY TK_INCLUDE_PATH TK_WISH)
+ REQUIRED_VARS TK_LIBRARY TK_STUB_LIBRARY TK_INCLUDE_PATH TK_WISH)
unset(FPHSA_NAME_MISMATCHED)
mark_as_advanced(
TCL_INCLUDE_PATH
+ TCL_LIBRARY
+ TCL_STUB_LIBRARY
+ TCL_TCLSH
TK_INCLUDE_PATH
- TCL_LIBRARY
TK_LIBRARY
- TCL_TCLSH
+ TK_STUB_LIBRARY
TK_WISH
+ TTK_STUB_LIBRARY
)
Modified: brlcad/trunk/src/other/itcl3/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/other/itcl3/CMakeLists.txt 2020-04-23 20:57:46 UTC (rev
75587)
+++ brlcad/trunk/src/other/itcl3/CMakeLists.txt 2020-04-23 21:17:15 UTC (rev
75588)
@@ -176,7 +176,7 @@
# ITcl requires private Tcl headers, which we can't assume from a system
# install of Tcl. The workaround is to use our local copies and hope they
# are workable. (Ugh.)
-if (TARGET tcl OR NOT EXISTS ${TCL_INCLUDE_PATH}/tcl-private/generic)
+if (TARGET tcl OR NOT EXISTS "${TCL_INCLUDE_PATH}/tcl-private/generic")
set(TCL_PRIVATE_HDRS ${CMAKE_CURRENT_SOURCE_DIR}/../tcl/generic)
if(NOT WIN32)
set(TCL_PRIVATE_HDRS ${TCL_PRIVATE_HDRS}
${CMAKE_CURRENT_SOURCE_DIR}/../tcl/unix)
Modified: brlcad/trunk/src/other/itk3/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/other/itk3/CMakeLists.txt 2020-04-23 20:57:46 UTC (rev
75587)
+++ brlcad/trunk/src/other/itk3/CMakeLists.txt 2020-04-23 21:17:15 UTC (rev
75588)
@@ -42,37 +42,8 @@
# set CMake project name
project(ITK)
-if(NOT TCL_LIBRARY OR NOT TCL_INCLUDE_PATH OR NOT TK_LIBRARY)
- find_package(TCL)
-endif(NOT TCL_LIBRARY OR NOT TCL_INCLUDE_PATH OR NOT TK_LIBRARY)
+find_package(TCL)
-if(NOT TCL_STUB_LIBRARY OR NOT TK_STUB_LIBRARY OR NOT ITCL_STUB_LIBRARY)
- if(TARGET tclsh)
- message(FATAL_ERROR "We're building tclsh, but TCL_STUB_LIBRARY isn't set
- this is most likely due to an error in the build system logic.")
- endif(TARGET tclsh)
- if(NOT TCL_TCLSH)
- find_program(TCL_TCLSH tclsh)
- endif(NOT TCL_TCLSH)
- if(NOT TCL_TCLSH)
- message(FATAL_ERROR "itcl enabled, but tclsh is not available and
TCL_STUB_LIBRARY is undefined. Either specify the location of the tcl stub
library (-DTCL_STUB_LIBRARY=/path/to/libtclstub86.a) or identify the location
of tclsh (-DTCL_TCLSH=/path/to/tclsh)")
- endif(NOT TCL_TCLSH)
- get_filename_component(TCLSH_DIR "${TCL_TCLSH}" DIRECTORY)
- get_filename_component(TCLSH_ROOT_DIR "${TCLSH_DIR}" DIRECTORY)
-endif(NOT TCL_STUB_LIBRARY OR NOT TK_STUB_LIBRARY OR NOT ITCL_STUB_LIBRARY)
-
-if(NOT TCL_STUB_LIBRARY)
- find_library(TCL_STUB_LIBRARY tclstub NAMES tclstub86 tclstub8.6 HINTS
${TCLSH_ROOT_DIR}/lib)
-endif(NOT TCL_STUB_LIBRARY)
-if(NOT TK_STUB_LIBRARY)
- find_library(TK_STUB_LIBRARY tkstub NAMES tkstub86 tkstub8.6 HINTS
${TCLSH_ROOT_DIR}/lib)
-endif(NOT TK_STUB_LIBRARY)
-if(NOT ITCL_LIBRARY)
- find_library(ITCL_LIBRARY itcl NAMES itcl4 itcl4.2.0 HINTS
${TCLSH_ROOT_DIR}/lib)
-endif(NOT ITCL_LIBRARY)
-if(NOT ITCL_STUB_LIBRARY)
- find_library(ITCL_STUB_LIBRARY itclstub NAMES itclstub4 itclstub4.2.0 HINTS
${TCLSH_ROOT_DIR}/lib/Itcl4.2.0)
-endif(NOT ITCL_STUB_LIBRARY)
-
# version numbers
set(ITK_VERSION_MAJOR 3)
set(ITK_VERSION_MINOR 4)
@@ -180,17 +151,19 @@
# Like ITcl, Itk requires private Tcl headers, which we can't assume from a
system
# install of Tcl. The workaround is to use our local copies and hope they
# are workable. (Ugh.)
-if (TARGET tk OR NOT EXISTS ${TCL_INCLUDE_PATH}/tcl-private/generic)
+if (TARGET tk OR NOT EXISTS "${TCL_INCLUDE_PATH}/tcl-private/generic")
set(TCL_PRIVATE_HDRS ${CMAKE_CURRENT_SOURCE_DIR}/../tcl/generic)
if(NOT WIN32)
set(TCL_PRIVATE_HDRS ${TCL_PRIVATE_HDRS}
${CMAKE_CURRENT_SOURCE_DIR}/../tcl/unix)
else(NOT WIN32)
set(TCL_PRIVATE_HDRS ${TCL_PRIVATE_HDRS}
${CMAKE_CURRENT_SOURCE_DIR}/../tcl/win)
+ set(TCL_PRIVATE_HDRS ${TCL_PRIVATE_HDRS}
${CMAKE_CURRENT_SOURCE_DIR}/../tk/xlib)
endif(NOT WIN32)
else()
set(TCL_PRIVATE_HDRS ${TCL_INCLUDE_PATH}/tcl-private/generic)
if(NOT WIN32)
set(TCL_PRIVATE_HDRS ${TCL_PRIVATE_HDRS}
${TCL_INCLUDE_PATH}/tcl-private/unix)
+ set(TCL_PRIVATE_HDRS ${TCL_PRIVATE_HDRS}
${TK_INCLUDE_PATH}/tk-private/xlib)
else(NOT WIN32)
set(TCL_PRIVATE_HDRS ${TCL_PRIVATE_HDRS}
${TCL_INCLUDE_PATH}/tcl-private/win)
endif(NOT WIN32)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits