diff --git a/CMakeLists.txt b/CMakeLists.txt index b9bad5f..9da82b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,11 +25,12 @@ cmake_minimum_required(VERSION 3.16) enable_language(C) ## Policies ## +cmake_policy(SET CMP0009 NEW) # Do not follow symlinks in GLOB_RECURSE cmake_policy(SET CMP0048 NEW) # project sets VERSION vars +cmake_policy(SET CMP0070 NEW) # file(GENERATE) handles relative paths correctly cmake_policy(SET CMP0083 NEW) # PIE cmake_policy(SET CMP0091 NEW) # MSVC does not set the runtime library in CMAKE__FLAGS cmake_policy(SET CMP0092 NEW) # MSVC does not set the default /W3 in CMAKE__FLAGS -cmake_policy(SET CMP0009 NEW) # Do not follow symlinks in GLOB_RECURSE ## Modules ##################################################################### include(CMakePackageConfigHelpers) @@ -58,6 +59,19 @@ cmake_pop_check_state() if (HAVE_M) # if libm exist we want to link it to everything link_libraries(m) + set(TCL_LIBS m CACHE INTERNAL "") +endif () + +# These are for the {tcl,tk,tdbc}Config.sh files +if (MSVC) + set(TCL_LD "link -dll -nologo $<$:-release> $<$:-ltcg>" CACHE INTERNAL "") + set(TCL_AR "lib -nologo" CACHE INTERNAL "") +else () + # If not MSVC we assume UNIX compatible ar cr and cc -shared + get_filename_component(CC_NAME "${CMAKE_C_COMPILER}" NAME CACHE) + get_filename_component(AR_NAME "${CMAKE_AR}" NAME CACHE) + set(TCL_LD "${CC_NAME} -shared") + set(TCL_AR "${AR_NAME} cr") endif () ## Options ##################################################################### diff --git a/README.md b/README.md new file mode 100644 index 0000000..a02125e --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# TclTk + +### Disclaimer + +This Tcl distribution, if you can call it that, does not provide all the build functionality that the original Tcl +source distributions do: I see no chance of building Tcl on Ultrix, IRIX, AIX, OSF/1, VMS*, and other archaic/exotic +systems by using this project. (Even if the required system checks would be done correctly, whether CMake itself builds +on said platforms is most probably the tightest bottleneck.) + +*: I do not know if Tcl by default builds on VMS or not. I know Perl5 does, so I guess Tcl does too? + +## TclTk + +This repository provides a CMake project for building Tcl (including core packages) and Tk. + +Tcl/Tk is used by the optional GUI [DieShell/dsh](https://github.com/DieShell/dsh) provides and this project was born to +ease creating the installer for DieShell, by providing a homogenous CMake build environment for all DieShell and Tcl. + +C and corresponding header sources are only minimally modified where include paths do not work properly with the +original relative include paths. + +All AutoTools related build files are removed, with a few literally useless files which contain nothing; +Tcl's `threadUnix.c` file for example. (If I learn how to, I will send a patch about this latter change back to the Tcl +people.) + +## CMake Targets + +For use in other CMake projects, the following targets are defined for `target_link_libraries`. + +- `tcl` The Tcl shared library +- `tclstub` The Tcl stub library +- `tk` The Tk shared library +- `tkstub` The Tk stub library + +The `tclsh`, and `wish` executable targets may be used for custom commands that wish to rely on a fresh-baked Tcl +interpreter. + +## License and copyright + +Copyright (c) 2021, AndrĂ¡s Bodor + +CMake files and other related new sources are licensed under the zlib license. + +Copyright (c) Regents of the University of California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState +Corporation and other parties + +Tcl sources and binaries are licensed under the Tcl license available in whichever `license.terms` file in the +repository. diff --git a/tcl/CMakeLists.txt b/tcl/CMakeLists.txt index 83705a1..dc30b9e 100644 --- a/tcl/CMakeLists.txt +++ b/tcl/CMakeLists.txt @@ -146,11 +146,35 @@ set_source_files_properties(lib/unix_backend/src/tclUnixInit.c add_subdirectory(tests) ## Install ##################################################################### +set(IS_IMP_LIB "$,${CMAKE_STATIC_LIBRARY_PREFIX}$${CMAKE_STATIC_LIBRARY_SUFFIX}>>") +set(IMPORT_LINK "${CMAKE_LINK_LIBRARY_FILE_FLAG}$") +set(DIRECT_LINK "${CMAKE_LINK_LIBRARY_FLAG}$") +set(TCL_LINK_FLAG "$") + +set(IS_IMP_LIB_S "$>") +set(IMPORT_LINK_S "${CMAKE_LINK_LIBRARY_FILE_FLAG}$") +set(DIRECT_LINK_S "${CMAKE_LINK_LIBRARY_FLAG}$") +set(TCLSTUB_LINK_FLAG "$") + +configure_file(tclConfig.sh.in + tclConfig.sh.cmakein + @ONLY + ) +file(GENERATE + OUTPUT tclConfig.sh + INPUT "${CMAKE_CURRENT_BINARY_DIR}/tclConfig.sh.cmakein" + ) + if (TCL_ENABLE_INSTALL) install(TARGETS tcl tclsh tclstub RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ) + install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/tclConfig.sh" + "${CMAKE_CURRENT_SOURCE_DIR}/tclooConfig.sh" + DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ) if (TARGET tcl_reg) install(TARGETS tcl_reg DESTINATION "${CMAKE_INSTALL_LIBDIR}/reg${TCL_REG_VERSION}" diff --git a/tcl/lib/compat_layer/ansic.cmake b/tcl/lib/compat_layer/ansic.cmake index 4a29b9c..6098a8a 100644 --- a/tcl/lib/compat_layer/ansic.cmake +++ b/tcl/lib/compat_layer/ansic.cmake @@ -153,6 +153,9 @@ target_sources(tcl_config INTERFACE $<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/strtol.c> $<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/strtoul.c> ) +set(TCL_COMPAT_FILES + "${TCL_COMPAT_FILES};$<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/ansic/memcmp.c>;$<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/ansic/strstr.c>;$<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/strtol.c>;$<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/strtoul.c>" + CACHE INTERNAL "" FORCE) if (TCL_ENABLE_INSTALL_DEVELOPMENT) install(FILES diff --git a/tcl/lib/compat_layer/directory_io.cmake b/tcl/lib/compat_layer/directory_io.cmake index 4564951..d0fa93b 100644 --- a/tcl/lib/compat_layer/directory_io.cmake +++ b/tcl/lib/compat_layer/directory_io.cmake @@ -116,6 +116,10 @@ if (NOT HAVE_POSIX_DIR_IO) target_sources(tcl PRIVATE src/dirent_severe/opendir.c ) + + set(TCL_COMPAT_FILES + "${TCL_COMPAT_FILES};src/dirent_severe/opendir.c" + CACHE INTERNAL "" FORCE) target_compile_definitions(tcl_config INTERFACE USE_DIRENT2_H=1) # handle extra header install diff --git a/tcl/lib/compat_layer/dynamic_loading.cmake b/tcl/lib/compat_layer/dynamic_loading.cmake index 0a904cd..f964a62 100644 --- a/tcl/lib/compat_layer/dynamic_loading.cmake +++ b/tcl/lib/compat_layer/dynamic_loading.cmake @@ -29,11 +29,8 @@ cmake_push_check_state(RESET) check_include_file("dlfcn.h" HAVE_DLFCN_H) if (HAVE_DLFCN_H) - # we also probably need -ldl if we have dlopen - check_library_exists("dl" "dlopen" "" HAVE_DL) - if (HAVE_DL) - target_link_libraries(tcl PRIVATE dl) - endif () + target_link_libraries(tcl PRIVATE ${CMAKE_DL_LIBS}) + set(TCL_LIBS "${TCL_LIBS};${CMAKE_DL_LIBS}" CACHE INTERNAL "") endif () if (HAVE_DLFCN_H AND NOT APPLE) # apple is special diff --git a/tcl/lib/compat_layer/posix.cmake b/tcl/lib/compat_layer/posix.cmake index 9a8082a..133ec50 100644 --- a/tcl/lib/compat_layer/posix.cmake +++ b/tcl/lib/compat_layer/posix.cmake @@ -109,6 +109,9 @@ target_sources(tcl_config INTERFACE $<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/mkstemp.c> $<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/gettod.c> ) +set(TCL_COMPAT_FILES + "${TCL_COMPAT_FILES};$<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/waitpid.c>;$<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/strncasecmp.c>;$<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/mkstemp.c>;$<$>:${CMAKE_CURRENT_SOURCE_DIR}/src/gettod.c>" + CACHE INTERNAL "" FORCE) if (TCL_ENABLE_INSTALL_DEVELOPMENT) install(FILES diff --git a/tcl/lib/compat_layer/rfc2553.cmake b/tcl/lib/compat_layer/rfc2553.cmake index 595bb4b..af9d83e 100644 --- a/tcl/lib/compat_layer/rfc2553.cmake +++ b/tcl/lib/compat_layer/rfc2553.cmake @@ -91,6 +91,9 @@ target_compile_definitions(tcl_config INTERFACE ) target_sources(tcl PRIVATE src/rfc2553/fake-rfc2553.c) +set(TCL_COMPAT_FILES + "${TCL_COMPAT_FILES};${CMAKE_CURRENT_SOURCE_DIR}/src/rfc2553/fake-rfc2553.c" + CACHE INTERNAL "" FORCE) if (TCL_ENABLE_INSTALL_DEVELOPMENT) install(FILES diff --git a/tcl/lib/compat_layer/threading.cmake b/tcl/lib/compat_layer/threading.cmake index 1c70a80..ff120c3 100644 --- a/tcl/lib/compat_layer/threading.cmake +++ b/tcl/lib/compat_layer/threading.cmake @@ -31,6 +31,7 @@ if (Threads_FOUND) $<$>:_THREAD_SAFE=1> ) target_link_libraries(tcl_config INTERFACE Threads::Threads) + set(TCL_LIBS "${TCL_LIBS};${CMAKE_THREAD_LIBS_INIT}" CACHE INTERNAL "") else () message(WARNING [[Threading support was requested (TCL_ENABLE_THREADS defaults to on), but the system doesn't seem to have a compatible threading API. Thenceforth, no threading diff --git a/tcl/lib/unix_backend/CMakeLists.txt b/tcl/lib/unix_backend/CMakeLists.txt index 3594aff..db2b0a7 100644 --- a/tcl/lib/unix_backend/CMakeLists.txt +++ b/tcl/lib/unix_backend/CMakeLists.txt @@ -201,6 +201,7 @@ cmake_pop_check_state() ## Xt ########################################################################## find_package(X11 REQUIRED Xt) target_link_libraries(tcl_config INTERFACE X11::Xt) +set(TCL_LIBS "${TCL_LIBS};${X11_X11_LIB};${X11_Xt_LIB}" CACHE INTERNAL "") ## Configuration ############################################################### target_compile_definitions(tcl_config INTERFACE @@ -236,7 +237,7 @@ target_include_directories(tcl_config INTERFACE $ $ ) - + if (TCL_ENABLE_INSTALL_DEVELOPMENT) install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/tclUnixPort.h" diff --git a/tcl/lib/win32_backend/CMakeLists.txt b/tcl/lib/win32_backend/CMakeLists.txt index be98ca8..187a8d4 100644 --- a/tcl/lib/win32_backend/CMakeLists.txt +++ b/tcl/lib/win32_backend/CMakeLists.txt @@ -247,7 +247,12 @@ if (TARGET tcltest) ) endif () -target_link_libraries(tcl_config INTERFACE kernel32 ws2_32 netapi32 userenv user32 advapi32) +set(WIN_LIBS + kernel32 user32 gdi32 winspool shell32 ole32 oleaut32 + uuid comdlg32 advapi32 ws2_32 netapi32 userenv + ) +target_link_libraries(tcl_config INTERFACE ${WIN_LIBS}) +set(TCL_LIBS "${TCL_LIBS};${WIN_LIBS}" CACHE INTERNAL "") if (TCL_ENABLE_INSTALL_DEVELOPMENT) install(FILES diff --git a/tcl/pkgs/itcl4.2.1/CMakeLists.txt b/tcl/pkgs/itcl4.2.1/CMakeLists.txt index e204c2a..57d892d 100644 --- a/tcl/pkgs/itcl4.2.1/CMakeLists.txt +++ b/tcl/pkgs/itcl4.2.1/CMakeLists.txt @@ -111,12 +111,32 @@ configure_file(src/itcl.rc.in add_subdirectory(tests) ## Install ##################################################################### +set(IS_IMP_LIB "$,${CMAKE_STATIC_LIBRARY_PREFIX}$${CMAKE_STATIC_LIBRARY_SUFFIX}>>") +set(IMPORT_LINK "${CMAKE_LINK_LIBRARY_FILE_FLAG}$") +set(DIRECT_LINK "${CMAKE_LINK_LIBRARY_FLAG}$") +set(ITCL_LINK_FLAG "$") + +set(IS_IMP_LIB_S "$>") +set(IMPORT_LINK_S "${CMAKE_LINK_LIBRARY_FILE_FLAG}$") +set(DIRECT_LINK_S "${CMAKE_LINK_LIBRARY_FLAG}$") +set(ITCLSTUB_LINK_FLAG "$") + +configure_file(itclConfig.sh.in + itclConfig.sh.cmakein + @ONLY + ) +file(GENERATE + OUTPUT itclConfig.sh + INPUT "${CMAKE_CURRENT_BINARY_DIR}/itclConfig.sh.cmakein" + ) + if (TCL_ENABLE_INSTALL) install(TARGETS tea_itcl tea_itclstub DESTINATION "${CMAKE_INSTALL_LIBDIR}/itcl${ITCL_VERSION}" ) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkgIndex.tcl" + "${CMAKE_CURRENT_BINARY_DIR}/itclConfig.sh" "${CMAKE_CURRENT_SOURCE_DIR}/tcl/itcl.tcl" "${CMAKE_CURRENT_SOURCE_DIR}/tcl/itclHullCmds.tcl" "${CMAKE_CURRENT_SOURCE_DIR}/tcl/itclWidget.tcl" diff --git a/tcl/pkgs/itcl4.2.1/itclConfig.sh.in b/tcl/pkgs/itcl4.2.1/itclConfig.sh.in new file mode 100644 index 0000000..260fe17 --- /dev/null +++ b/tcl/pkgs/itcl4.2.1/itclConfig.sh.in @@ -0,0 +1,70 @@ +# itclConfig.sh -- +# +# This shell script (for sh) is generated automatically by Itcl's +# configure script. It will create shell variables for most of +# the configuration options discovered by the configure script. +# This script is intended to be included by the configure scripts +# for Itcl extensions so that they don't have to figure this all +# out for themselves. This file does not duplicate information +# already provided by tclConfig.sh, so you may need to use that +# file in addition to this one. +# +# The information in this file is specific to a single platform. + +# Itcl's version number. +itcl_VERSION='@ITCL_VERSION@' +ITCL_VERSION='@ITCL_VERSION@' + +# The name of the Itcl library (may be either a .a file or a shared library): +itcl_LIB_FILE=$ +ITCL_LIB_FILE=$ + +# String to pass to linker to pick up the Itcl library from its +# build directory. +itcl_BUILD_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @ITCL_LINK_FLAG@' +ITCL_BUILD_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @ITCL_LINK_FLAG@' + +# String to pass to linker to pick up the Itcl library from its +# installed directory. +itcl_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@/itcl@ITCL_VERSION@" @ITCL_LINK_FLAG@' +ITCL_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@/itcl@ITCL_VERSION@" @ITCL_LINK_FLAG@' + +# The name of the Itcl stub library (a .a file): +itcl_STUB_LIB_FILE="$" +ITCL_STUB_LIB_FILE="$" + +# String to pass to linker to pick up the Itcl stub library from its +# build directory. +itcl_BUILD_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @ITCLSTUB_LINK_FLAG@' +ITCL_BUILD_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @ITCLSTUB_LINK_FLAG@' + +# String to pass to linker to pick up the Itcl stub library from its +# installed directory. +itcl_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@/itcl@ITCL_VERSION@" @ITCLSTUB_LINK_FLAG@' +ITCL_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@/itcl@ITCL_VERSION@" @ITCLSTUB_LINK_FLAG@' + +# String to pass to linker to pick up the Itcl stub library from its +# build directory. +itcl_BUILD_STUB_LIB_PATH='$' +ITCL_BUILD_STUB_LIB_PATH='$' + +# String to pass to linker to pick up the Itcl stub library from its +# installed directory. +itcl_STUB_LIB_PATH='@CMAKE_INSTALL_FULL_LIBDIR@/itcl@ITCL_VERSION@/$' +ITCL_STUB_LIB_PATH='@CMAKE_INSTALL_FULL_LIBDIR@/itcl@ITCL_VERSION@/$' + +# Location of the top-level source directories from which [incr Tcl] +# was built. This is the directory that contains generic, unix, etc. +# If [incr Tcl] was compiled in a different place than the directory +# containing the source files, this points to the location of the sources, +# not the location where [incr Tcl] was compiled. +# This is not defined correctly because we *REALLY* changed project layout +# and would lead to confusion +# Fancy ASCII art as we hope to force a failure upon use +itcl_SRC_DIR='\\&)*(-/SEE PROVIDED itclConfig.sh FOR REASONING WHY YOU SEE THIS/-)*(&\\' +ITCL_SRC_DIR='\\&)*(-/SEE PROVIDED itclConfig.sh FOR REASONING WHY YOU SEE THIS/-)*(&\\' + +# String to pass to the compiler so that an extension can +# find installed Itcl headers. +itcl_INCLUDE_SPEC='@CMAKE_CURRENT_SOURCE_DIR@/src' +ITCL_INCLUDE_SPEC='@CMAKE_CURRENT_SOURCE_DIR@/src' diff --git a/tcl/pkgs/tdbc1.1.2/CMakeLists.txt b/tcl/pkgs/tdbc1.1.2/CMakeLists.txt index dc6b77e..cefe7ec 100644 --- a/tcl/pkgs/tdbc1.1.2/CMakeLists.txt +++ b/tcl/pkgs/tdbc1.1.2/CMakeLists.txt @@ -75,12 +75,12 @@ target_link_libraries(tea_tdbc PRIVATE tea_tdbc_config) target_link_libraries(tea_tdbcstub PRIVATE tea_tdbc_config) target_compile_definitions(tea_tdbc PRIVATE - PACKAGE_NAME="tdbc" - PACKAGE_VERSION="${TDBC_VERSION}" + "PACKAGE_NAME=\"tdbc\"" + "PACKAGE_VERSION=\"${TDBC_VERSION}\"" ) target_compile_definitions(tea_tdbcstub PRIVATE - PACKAGE_NAME="tdbc" - PACKAGE_VERSION="${TDBC_VERSION}" + "PACKAGE_NAME=\"tdbc\"" + "PACKAGE_VERSION=\"${TDBC_VERSION}\"" ) target_compile_definitions(tea_tdbc_config INTERFACE BUILD_tdbc=1 @@ -133,12 +133,31 @@ configure_file(src/tdbc.rc.in add_subdirectory(tests) ## Install ##################################################################### +set(IS_IMP_LIB "$,${CMAKE_STATIC_LIBRARY_PREFIX}$${CMAKE_STATIC_LIBRARY_SUFFIX}>>") +set(IMPORT_LINK "${CMAKE_LINK_LIBRARY_FILE_FLAG}$") +set(DIRECT_LINK "${CMAKE_LINK_LIBRARY_FLAG}$") +set(TDBC_LINK_FLAG "$") + +set(IS_IMP_LIB_S "$>") +set(IMPORT_LINK_S "${CMAKE_LINK_LIBRARY_FILE_FLAG}$") +set(DIRECT_LINK_S "${CMAKE_LINK_LIBRARY_FLAG}$") +set(TDBCSTUB_LINK_FLAG "$") + +configure_file(tdbcConfig.sh.in + tdbcConfig.sh.cmakein + @ONLY + ) +file(GENERATE OUTPUT tdbcConfig.sh + INPUT "${CMAKE_CURRENT_BINARY_DIR}/tdbcConfig.sh.cmakein" + ) + if (TCL_ENABLE_INSTALL) install(TARGETS tea_tdbc tea_tdbcstub DESTINATION "${CMAKE_INSTALL_LIBDIR}/tdbc${TDBC_VERSION}" ) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkgIndex.tcl" + "${CMAKE_CURRENT_BINARY_DIR}/tdbcConfig.sh" "${CMAKE_CURRENT_SOURCE_DIR}/tcl/tdbc.tcl" DESTINATION "${CMAKE_INSTALL_LIBDIR}/tdbc${TDBC_VERSION}" diff --git a/tcl/pkgs/tdbc1.1.2/tdbcConfig.sh.in b/tcl/pkgs/tdbc1.1.2/tdbcConfig.sh.in new file mode 100644 index 0000000..78cf97a --- /dev/null +++ b/tcl/pkgs/tdbc1.1.2/tdbcConfig.sh.in @@ -0,0 +1,84 @@ +# tdbcConfig.sh -- +# +# This shell script (for sh) is generated automatically by TDBC's configure +# script. It will create shell variables for most of the configuration options +# discovered by the configure script. This script is intended to be included +# by the configure scripts for TDBC extensions so that they don't have to +# figure this all out for themselves. +# +# The information in this file is specific to a single platform. +# +# RCS: @(#) $Id$ + +# TDBC's version number +tdbc_VERSION=@TDBC_VERSION@ +TDBC_VERSION=@TDBC_VERSION@ + +# Name of the TDBC library - may be either a static or shared library +tdbc_LIB_FILE=$ +TDBC_LIB_FILE=$ + +# String to pass to the linker to pick up the TDBC library from its build dir +tdbc_BUILD_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @TDBCSTUB_LINK_FLAG@' +TDBC_BUILD_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @TDBCSTUB_LINK_FLAG@' + +# String to pass to the linker to pick up the TDBC library from its installed +# dir. +tdbc_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@/tdbc@TDBC_VERSION@" @TDBC_LINK_FLAG@' +TDBC_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@/tdbc@TDBC_VERSION@" @TDBC_LINK_FLAG@' + +# Name of the TBDC stub library +tdbc_STUB_LIB_FILE='$' +TDBC_STUB_LIB_FILE='$' + +# String to pass to the linker to pick up the TDBC stub library from its +# build directory +tdbc_BUILD_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @TDBCSTUB_LINK_FLAG@' +TDBC_BUILD_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @TDBCSTUB_LINK_FLAG@' + +# String to pass to the linker to pick up the TDBC stub library from its +# installed directory +tdbc_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@/tdbc@TDBC_VERSION@" @TDBCSTUB_LINK_FLAG@' +TDBC_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@/tdbc@TDBC_VERSION@" @TDBCSTUB_LINK_FLAG@' + +# Path name of the TDBC stub library in its build directory +tdbc_BUILD_STUB_LIB_PATH='$' +TDBC_BUILD_STUB_LIB_PATH='$' + +# Path name of the TDBC stub library in its installed directory +tdbc_STUB_LIB_PATH='@CMAKE_INSTALL_FULL_LIBDIR@/tdbc@TDBC_VERSION@/$' +TDBC_STUB_LIB_PATH='@CMAKE_INSTALL_FULL_LIBDIR@/tdbc@TDBC_VERSION@/$' + +# Location of the top-level source directories from which TDBC was built. +# This is the directory that contains doc/, generic/ and so on. If TDBC +# was compiled in a directory other than the source directory, this still +# points to the location of the sources, not the location where TDBC was +# compiled. +# This is not defined correctly because we *REALLY* changed project layout +# and would lead to confusion +# Fancy ASCII art as we hope to force a failure upon use +tdbc_SRC_DIR='\\&)*(-/SEE PROVIDED tdbcConfig.sh FOR REASONING WHY YOU SEE THIS/-)*(&\\' +TDBC_SRC_DIR='\\&)*(-/SEE PROVIDED tdbcConfig.sh FOR REASONING WHY YOU SEE THIS/-)*(&\\' + +# String to pass to the compiler so that an extension can find installed TDBC +# headers +tdbc_INCLUDE_SPEC='-I"@CMAKE_INSTALL_FULL_INCLUDEDIR@"' +TDBC_INCLUDE_SPEC='-I"@CMAKE_INSTALL_FULL_INCLUDEDIR@"' + +# String to pass to the compiler so that an extension can find TDBC headers +# in the source directory +tdbc_BUILD_INCLUDE_SPEC='-I"@CMAKE_CURRENT_SOURCE_DIR@/src"' +TDBC_BUILD_INCLUDE_SPEC='-I"@CMAKE_CURRENT_SOURCE_DIR@/src"' + +# Path name where .tcl files in the tdbc package appear at run time. +tdbc_LIBRARY_PATH='@CMAKE_INSTALL_FULL_LIBDIR@/tdbc@TDBC_VERSION@' +TDBC_LIBRARY_PATH='@CMAKE_INSTALL_FULL_LIBDIR@/tdbc@TDBC_VERSION@' + +# Path name where .tcl files in the tdbc package appear at build time. +tdbc_BUILD_LIBRARY_PATH='@CMAKE_CURRENT_SOURCE_DIR@/tcl' +TDBC_BUILD_LIBRARY_PATH='@CMAKE_CURRENT_SOURCE_DIR@/tcl' + +# Additional flags that must be passed to the C compiler to use tdbc +tdbc_CFLAGS=$<0:These are literally empty in the original project> +TDBC_CFLAGS=$<0:So I'm leaving them empty. Probably legacy reasons> + diff --git a/tcl/tclConfig.sh.in b/tcl/tclConfig.sh.in new file mode 100644 index 0000000..6034695 --- /dev/null +++ b/tcl/tclConfig.sh.in @@ -0,0 +1,189 @@ +# tclConfig.sh -- +# +# This file is automagically generated by the Tcl CMake build script. +# The intent is to provide the correct shell variables as by the original +# tclConfig.sh as provided by Tcl's AutoConf files. +# +# Not that this file is probably buggy as all f**k. +# +# The information in this file is still specific to a single platform. +$<0:While reading the source, these lines are comments.> + +TCL_DLL_FILE="$" + +# Tcl's version number. +TCL_VERSION='@TCL_VERSION@' +TCL_MAJOR_VERSION='@TCL_MAJOR_VERSION@' +TCL_MINOR_VERSION='@TCL_MINOR_VERSION@' +TCL_PATCH_LEVEL='@TCL_PATCH_LEVEL@' + +# C compiler to use for compilation. +TCL_CC='@CMAKE_C_COMPILER@' + +# -D flags for use with the C compiler. +TCL_DEFS='$<$>:-D$, -D>>' + +# If TCL was built with debugging symbols, generated libraries contain +# this string at the end of the library name (before the extension). +$<0:Build suffixes are for the weak and fools> +$<0:A debug build should never leave your build system's boundaries therefore this thing is meaningless> +TCL_DBGX= + +# Default flags used in an optimized and debuggable build, respectively. +TCL_CFLAGS_DEBUG='@CMAKE_C_FLAGS_DEBUG@ $, >' +TCL_CFLAGS_OPTIMIZE='@CMAKE_C_FLAGS_RELEASE@ $, >' + +# Default linker flags used in an optimized and debuggable build, respectively. +TCL_LDFLAGS_DEBUG='$, >' +TCL_LDFLAGS_OPTIMIZE='$, >' + +# Flag, 1: we built a shared lib, 0 we didn't +TCL_SHARED_BUILD=$ + +# The name of the Tcl library (may be either a .a file or a shared library): +TCL_LIB_FILE='$' + +# Flag to indicate whether shared libraries need export files. +$<0:CMake by default exports all on AIX, and for Windows we don't need a different file> +TCL_NEEDS_EXP_FILE=$<$:$>> + +# String that can be evaluated to generate the part of the export file +# name that comes after the "libxxx" (includes version number, if any, +# extension, and anything else needed). May depend on the variables +# VERSION. On most UNIX systems this is ${VERSION}.exp. +TCL_EXPORT_FILE_SUFFIX='@TCL_DOUBLE_VERSION@@CMAKE_IMPORT_LIBRARY_SUFFIX@' + +# Additional libraries to use when linking Tcl. +TCL_LIBS='$<$:@CMAKE_LINK_LIBRARY_FLAG@$ @CMAKE_LINK_LIBRARY_FLAG@>@CMAKE_IMPORT_LIBRARY_SUFFIX@>' + +# Top-level directory in which Tcl's platform-independent files are +# installed. +TCL_PREFIX='@CMAKE_INSTALL_PREFIX@' + +# Top-level directory in which Tcl's platform-specific files (e.g. +# executables) are installed. +TCL_EXEC_PREFIX='@CMAKE_INSTALL_PREFIX@' + +# Flags to pass to cc when compiling the components of a shared library: +TCL_SHLIB_CFLAGS='@CMAKE_C_FLAGS@' + +# Flags to pass to cc to get warning messages +TCL_CFLAGS_WARNING='' + +# Extra flags to pass to cc: +TCL_EXTRA_CFLAGS='' + +# Base command to use for combining object files into a shared library: +TCL_SHLIB_LD='@TCL_LD@ $, >' + +# Base command to use for combining object files into a static library: +$<0:If not MSVC we assume UNIX-ish ar which accepts "cr"> +TCL_STLIB_LD='@TCL_AR@ $, >' + +# Either '$LIBS' (if dependent libraries should be included when linking +# shared libraries) or an empty string. See Tcl's configure.in for more +# explanation. +TCL_SHLIB_LD_LIBS='${LIBS}' + +# Suffix to use for the name of a shared library. +TCL_SHLIB_SUFFIX='@CMAKE_SHARED_LIBRARY_SUFFIX@' + +# Library file(s) to include in tclsh and other base applications +# in order to provide facilities needed by DLOBJ above. +TCL_DL_LIBS='@CMAKE_DL_LIBS@' + +# Flags to pass to the compiler when linking object files into +# an executable tclsh or tcltest binary. +TCL_LD_FLAGS='@CMAKE_EXE_LINKER_FLAGS@' + +# Flags to pass to cc/ld, such as "-R /usr/local/tcl/lib", that tell the +# run-time dynamic linker where to look for shared libraries such as +# libtcl.so. Used when linking applications. Only works if there +# is a variable "LIB_RUNTIME_DIR" defined in the Makefile. +TCL_CC_SEARCH_FLAGS='' +TCL_LD_SEARCH_FLAGS='' + +# Additional object files linked with Tcl to provide compatibility +# with standard facilities from ANSI C or POSIX. +TCL_COMPAT_OBJS='$<$:$>' + +# Name of the ranlib program to use. +TCL_RANLIB='@CMAKE_RANLIB@' + +# -l flag to pass to the linker to pick up the Tcl library +TCL_LIB_FLAG='@TCL_LINK_FLAG@' + +# String to pass to linker to pick up the Tcl library from its +# build directory. +TCL_BUILD_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @TCL_LINK_FLAG@' + +# String to pass to linker to pick up the Tcl library from its +# installed directory. +TCL_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@" @TCL_LINK_FLAG@' + +# String to pass to the compiler so that an extension can +# find installed Tcl headers. +TCL_INCLUDE_SPEC='-I"@CMAKE_INSTALL_FULL_INCLUDEDIR@"' + +# Indicates whether a version numbers should be used in -l switches +# ("ok" means it's safe to use switches like -ltcl7.5; "nodots" means +# use switches like -ltcl75). SunOS and FreeBSD require "nodots", for +# example. +$<0:There is no reason for use to use those things. We build targets without dots> +TCL_LIB_VERSIONS_OK='nodots' + +# String that can be evaluated to generate the part of a shared library +# name that comes after the "libxxx" (includes version number, if any, +# extension, and anything else needed). May depend on the variables +# VERSION and SHLIB_SUFFIX. On most UNIX systems this is +# ${VERSION}${SHLIB_SUFFIX}. +TCL_SHARED_LIB_SUFFIX='@TCL_DOUBLE_VERSION@@CMAKE_SHARED_LIBRARY_SUFFIX@' + +# String that can be evaluated to generate the part of an unshared library +# name that comes after the "libxxx" (includes version number, if any, +# extension, and anything else needed). May depend on the variable +# VERSION. On most UNIX systems this is ${VERSION}.a. +TCL_UNSHARED_LIB_SUFFIX='@TCL_DOUBLE_VERSION@@CMAKE_STATIC_LIBRARY_SUFFIX@' + +# Location of the top-level source directory from which Tcl was built. +# This is the directory that contains a README file as well as +# subdirectories such as generic, unix, etc. If Tcl was compiled in a +# different place than the directory containing the source files, this +# points to the location of the sources, not the location where Tcl was +# compiled. +# This is not defined correctly because we *REALLY* changed project layout +# and would lead to confusion +# Fancy ASCII art as we hope to force a failure upon use +TCL_SRC_DIR='\\(*)-/SEE PROVIDED tclConfig.sh FOR REASONING WHY YOU SEE THIS/-(*)\\' + +# List of standard directories in which to look for packages during +# "package require" commands. Contains the "prefix" directory plus also +# the "exec_prefix" directory, if it is different. +TCL_PACKAGE_PATH='{@CMAKE_INSTALL_FULL_LIBDIR@}' + +# Tcl supports stub. $<0:We always support stubs> +TCL_SUPPORTS_STUBS=1 + +# The name of the Tcl stub library (.a): +TCL_STUB_LIB_FILE='$' + +# -l flag to pass to the linker to pick up the Tcl stub library +TCL_STUB_LIB_FLAG='@TCLSTUB_LINK_FLAG@' + +# String to pass to linker to pick up the Tcl stub library from its +# build directory. +TCL_BUILD_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @TCLSTUB_LINK_FLAG@' + +# String to pass to linker to pick up the Tcl stub library from its +# installed directory. +TCL_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@" @TCLSTUB_LINK_FLAG@' + +# Path to the Tcl stub library in the build directory. +TCL_BUILD_STUB_LIB_PATH='$' + +# Path to the Tcl stub library in the install directory. +TCL_STUB_LIB_PATH='@CMAKE_INSTALL_FULL_LIBDIR@/$' + +# Flag, 1: we built Tcl with threads enabled, 0 we didn't +TCL_THREADS=$ + diff --git a/tcl/tclooConfig.sh b/tcl/tclooConfig.sh new file mode 100644 index 0000000..2279542 --- /dev/null +++ b/tcl/tclooConfig.sh @@ -0,0 +1,19 @@ +# tclooConfig.sh -- +# +# This shell script (for sh) is generated automatically by TclOO's configure +# script, or would be except it has no values that we substitute. It will +# create shell variables for most of the configuration options discovered by +# the configure script. This script is intended to be included by TEA-based +# configure scripts for TclOO extensions so that they don't have to figure +# this all out for themselves. +# +# The information in this file is specific to a single platform. + +# These are mostly empty because no special steps are ever needed from Tcl 8.6 +# onwards; all libraries and include files are just part of Tcl. +TCLOO_LIB_SPEC="" +TCLOO_STUB_LIB_SPEC="" +TCLOO_INCLUDE_SPEC="" +TCLOO_PRIVATE_INCLUDE_SPEC="" +TCLOO_CFLAGS="" +TCLOO_VERSION=1.1.0 diff --git a/tk/CMakeLists.txt b/tk/CMakeLists.txt index 7ff07a2..91438b7 100644 --- a/tk/CMakeLists.txt +++ b/tk/CMakeLists.txt @@ -130,10 +130,34 @@ add_subdirectory(library) add_subdirectory(tests) ## Install ##################################################################### +set(IS_IMP_LIB "$,${CMAKE_STATIC_LIBRARY_PREFIX}$${CMAKE_STATIC_LIBRARY_SUFFIX}>>") +set(IMPORT_LINK "${CMAKE_LINK_LIBRARY_FILE_FLAG}$") +set(DIRECT_LINK "${CMAKE_LINK_LIBRARY_FLAG}$") +set(TCL_LINK_FLAG "$") + +set(IS_IMP_LIB_S "$>") +set(IMPORT_LINK_S "${CMAKE_LINK_LIBRARY_FILE_FLAG}$") +set(DIRECT_LINK_S "${CMAKE_LINK_LIBRARY_FLAG}$") +set(TCLSTUB_LINK_FLAG "$") + +configure_file(tkConfig.sh.in + tkConfig.sh.cmakein + @ONLY + ) +file(GENERATE + OUTPUT tkConfig.sh + INPUT "${CMAKE_CURRENT_BINARY_DIR}/tkConfig.sh.cmakein" + ) + if (TCL_ENABLE_INSTALL) - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pkgIndex.tcl" + install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/pkgIndex.tcl" + "${CMAKE_CURRENT_SOURCE_DIR}/lib/unix_backend/src/tkAppInit.c" DESTINATION "${CMAKE_INSTALL_LIBDIR}/tk${TK_VERSION}" ) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tkConfig.sh" + DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ) install(TARGETS tk wish tkstub RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" diff --git a/tk/lib/common/CMakeLists.txt b/tk/lib/common/CMakeLists.txt index 51f8fa9..50a136c 100644 --- a/tk/lib/common/CMakeLists.txt +++ b/tk/lib/common/CMakeLists.txt @@ -58,6 +58,9 @@ target_sources(tk PRIVATE src/ttk/ttkTrack.c src/ttk/ttkTreeview.c src/ttk/ttkWidget.c src/ttk/ttkWidget.h ) +if (WIN32 OR APPLE) + target_sources(tk PRIVATE src/tkPointer.c) +endif () target_sources(tkstub PRIVATE src/tkStubLib.c src/ttk/ttkStubLib.c diff --git a/tk/lib/compat_layer/CMakeLists.txt b/tk/lib/compat_layer/CMakeLists.txt index 1f9a223..b3d19ae 100644 --- a/tk/lib/compat_layer/CMakeLists.txt +++ b/tk/lib/compat_layer/CMakeLists.txt @@ -5,11 +5,11 @@ # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages # arising from the use of this software. -# +# # Permission is granted to anyone to use this software for any purpose, # including commercial applications, and to alter it and redistribute it # freely, subject to the following restrictions: -# +# # 1. The origin of this software must not be misrepresented; you must not # claim that you wrote the original software. If you use this software # in a product, an acknowledgment in the product documentation would be @@ -20,7 +20,7 @@ project(tk-compat-layer C) # This file does basically nothing, as we can just check the same values from -# the Tcl build, however, if X11 is not available on non Aqua build, we +# the Tcl build, however, if X11 is not available on non Aqua build, we # provide that. Applies to Windows too, but don't ask me why. if (TK_WINDOWING_SYSTEM STREQUAL "Aqua") @@ -32,6 +32,7 @@ find_package(X11) if (X11_FOUND) # System has X11, nothing else to do, just use it target_link_libraries(tk_config INTERFACE X11::X11) + set(TK_LIBS "${TK_LIBS};${X11_X11_LIB}" CACHE INTERNAL "") return () endif () @@ -43,7 +44,7 @@ target_include_directories(tk_config INTERFACE target_sources(tk_config INTERFACE src/X/xbytes.h src/X/xcolors.c - src/X/xdraw.c + src/X/xdraw.c src/X/xgc.c src/X/ximage.c src/X/xutil.c diff --git a/tk/lib/unix_backend/CMakeLists.txt b/tk/lib/unix_backend/CMakeLists.txt index df1be0f..2ac52cb 100644 --- a/tk/lib/unix_backend/CMakeLists.txt +++ b/tk/lib/unix_backend/CMakeLists.txt @@ -86,6 +86,7 @@ if (TK_ENABLE_XFT) target_link_libraries(tk_config INTERFACE X11::Xft ) + set(TK_LIBS "${TK_LIBS};${X11_Xft_LIB}" CACHE INTERNAL "") target_compile_definitions(tk_config INTERFACE HAVE_XFT=1 ) @@ -101,10 +102,11 @@ endif () if (TK_ENABLE_XSS) if (X11_Xext_FOUND AND X11_Xss_FOUND) target_link_libraries(tk_config INTERFACE X11::Xext) - if (HAVE_WEAK_LINK) - else () +# if (HAVE_WEAK_LINK) TODO +# else () target_link_libraries(tk_config INTERFACE X11::Xss) - endif () +# endif () + set(TK_LIBS "${TK_LIBS};${X11_Xss_LIB};${X11_Xext_LIB}" CACHE INTERNAL "") target_compile_definitions(tk_config INTERFACE HAVE_XSS=1) else () message(WARNING [[Xss was requested but CMake couldn't find it for us. Not using it.]]) @@ -114,4 +116,4 @@ endif () target_link_libraries(tk_config INTERFACE $<$:Xbsd> ) - +set(TK_LIBS "${TK_LIBS};$<$:Xbsd>" CACHE INTERNAL "") diff --git a/tk/lib/win32_backend/CMakeLists.txt b/tk/lib/win32_backend/CMakeLists.txt index 80ad30f..6472391 100644 --- a/tk/lib/win32_backend/CMakeLists.txt +++ b/tk/lib/win32_backend/CMakeLists.txt @@ -100,7 +100,9 @@ target_link_options(wish PRIVATE $<$:-mwindows> ) -target_link_libraries(tk_config INTERFACE - netapi32 kernel32 user32 advapi32 userenv ws2_32 gdi32 - comdlg32 imm32 comctl32 shell32 uuid ole32 oleaut32 - ) +set(TK_WIN_LIBS + netapi32 kernel32 user32 advapi32 userenv ws2_32 gdi32 + comdlg32 imm32 comctl32 shell32 uuid ole32 oleaut32 + ) +target_link_libraries(tk_config INTERFACE ${TK_WIN_LIBS}) +set(TK_LIBS "${TK_LIBS};${TK_WIN_LIBS}" CACHE INTERNAL "") diff --git a/tk/tkConfig.sh.in b/tk/tkConfig.sh.in new file mode 100644 index 0000000..e84a4e6 --- /dev/null +++ b/tk/tkConfig.sh.in @@ -0,0 +1,101 @@ +# tkConfig.sh -- +# +# This shell script (for sh) is generated automatically by Tk's +# configure script. It will create shell variables for most of +# the configuration options discovered by the configure script. +# This script is intended to be included by the configure scripts +# for Tk extensions so that they don't have to figure this all +# out for themselves. This file does not duplicate information +# already provided by tclConfig.sh, so you may need to use that +# file in addition to this one. +# +# The information in this file is specific to a single platform. + +TK_DLL_FILE='$' + +# Tk's version number. +TK_VERSION='@TK_VERSION@' +TK_MAJOR_VERSION='@TK_MAJOR_VERSION@' +TK_MINOR_VERSION='@TK_MINOR_VERSION@' +TK_PATCH_LEVEL='@TK_PATCH_LEVEL@' + +# -D flags for use with the C compiler. +TK_DEFS='$<$>:-D$, -D>>' + +# Flag, 1: we built a shared lib, 0 we didn't +TK_SHARED_BUILD=$ + +# TK_DBGX used to be used to distinguish debug vs. non-debug builds. +# This was a righteous pain so the core doesn't do that any more. +TK_DBGX=$<0: ^^^^ now what did I say???? > + +# The name of the Tk library (may be either a .a file or a shared library): +TK_LIB_FILE='$' + +# Additional libraries to use when linking Tk. +TK_LIBS='$<$:@CMAKE_LINK_LIBRARY_FLAG@$ @CMAKE_LINK_LIBRARY_FLAG@>>' + +# Top-level directory in which Tk's platform-independent files are +# installed. +TK_PREFIX='@CMAKE_INSTALL_PREFIX@' + +# Top-level directory in which Tk's platform-specific files (e.g. +# executables) are installed. +TK_EXEC_PREFIX='@CMAKE_INSTALL_PREFIX@' + +# -I switch(es) to use to make all of the X11 include files accessible: +TK_XINCLUDES='$<$:-I$>' + +# Linker switch(es) to use to link with the X11 library archive. +TK_XLIBSW='$<$:@CMAKE_LINK_LIBRARY_FLAG@$@CMAKE_IMPORT_LIBRARY_SUFFIX@>' + +# -l flag to pass to the linker to pick up the Tk library +TK_LIB_FLAG='@TK_LINK_FLAG@' + +# String to pass to linker to pick up the Tk library from its +# build directory. +TK_BUILD_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @TK_LINK_FLAG@' + +# String to pass to linker to pick up the Tk library from its +# installed directory. +TK_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@" @TK_LINK_FLAG@' + +# String to pass to the compiler so that an extension can +# find installed Tk headers. +TK_INCLUDE_SPEC='-I"@CMAKE_INSTALL_FULL_INCLUDEDIR@"' + +# Location of the top-level source directory from which Tk was built. +# This is the directory that contains a README file as well as +# subdirectories such as generic, unix, etc. If Tk was compiled in a +# different place than the directory containing the source files, this +# points to the location of the sources, not the location where Tk was +# compiled. +# This is not defined correctly because we *REALLY* changed project layout +# and would lead to confusion +# Fancy ASCII art as we hope to force a failure upon use +TK_SRC_DIR='\\(*)-/SEE PROVIDED tkConfig.sh FOR REASONING WHY YOU SEE THIS/-(*)\\' + +# Needed if you want to make a 'fat' shared library library +# containing tk objects or link a different wish. +TK_CC_SEARCH_FLAGS='' +TK_LD_SEARCH_FLAGS='' + +# The name of the Tk stub library (.a): +TK_STUB_LIB_FILE='$' + +# -l flag to pass to the linker to pick up the Tk stub library +TK_STUB_LIB_FLAG='@TKSTUB_LINK_FLAG@' + +# String to pass to linker to pick up the Tk stub library from its +# build directory. +TK_BUILD_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"$" @TKSTUB_LINK_FLAG@' + +# String to pass to linker to pick up the Tk stub library from its +# installed directory. +TK_STUB_LIB_SPEC='@CMAKE_LIBRARY_PATH_FLAG@"@CMAKE_INSTALL_FULL_LIBDIR@" @TKSTUB_LINK_FLAG@' + +# Path to the Tk stub library in the build directory. +TK_BUILD_STUB_LIB_PATH='$' + +# Path to the Tk stub library in the install directory. +TK_STUB_LIB_PATH='@CMAKE_INSTALL_FULL_LIBDIR@/$'