Compare commits

..
44 Commits
Author SHA1 Message Date
Christopher Sean Morrison 853629b6aa Revert "pass itcl vars forward"
This reverts commit ec648a3f3f.

We actually don't want to pass these vars forward because they're
potentially unset, and then when passed forward, they're cached and
subsequent find_library() calls skip even checking for it.
2025-03-19 03:17:04 -04:00
Christopher Sean Morrison 8fe78cfe60 fix latent tcl vs itcl typos 2025-03-19 03:00:16 -04:00
Christopher Sean Morrison 0388f4a12f sync with bext parent FindTCL.cmake which has Framework detection disabled.
cmake deprecated it in latest revs, so this also quells a bunch of policy warnings.  crazy that the files are embedded as patch data instead of file copies, but something to fix later.
2025-03-19 02:40:47 -04:00
Christopher Sean Morrison 5e72707059 update to latest main with updated FindTCL.cmake 2025-03-19 02:26:08 -04:00
Christopher Sean Morrison 79a7111dfa Since bext is not expected to be system-installed outside of a BRL-CAD
build (and doesn't appear to be structured for it right now also),
default CMAKE_INSTALL_PREFIX to the build directory (wherein it will
create an install and noinstall subdirs).

This addresses an issue where default bext builds with different
configurations (e.g., Release and Debug) won't look by default into a
common path (HOME/bext_output) and find other configuration
products. This was problematic for non-enable-all builds and even
existing partial builds since it would find and prefer to use the
found version in install even with enable-all.  The non-deterministic
nature made for very difficult to reproduce and debug failure states
as well.

Another issue was the default surprise of having files written outside
of the build dir, unspecified by the user.  This was exacerbated on a
system where build dir and home dir existed on different partitions
with different capacity and performance characteristics.
2025-03-18 11:00:26 -04:00
Clifford Yapp 90642ca5ae Add fix for CVE-2025-2151 2025-03-13 14:13:07 -04:00
Christopher Sean Morrison f11907cb9d stubs aren't passing forward. need our custom logic for Tcl to get vars set.
quell an if/endif warning while we're at it.
2025-03-04 04:29:57 -05:00
Christopher Sean Morrison 54be88f43f pass stub libs forward 2025-03-04 04:08:13 -05:00
Christopher Sean Morrison ec648a3f3f pass itcl vars forward 2025-03-04 03:54:54 -05:00
Christopher Sean Morrison ca22a6953d add a newline 2025-03-04 03:38:24 -05:00
Christopher Sean Morrison fdda7359c1 hint the location better? 2025-03-04 03:22:26 -05:00
Christopher Sean Morrison 4db3a8c285 resort to manually patching FindITCL.cmake into place, ugh. 2025-03-04 03:17:16 -05:00
Christopher Sean Morrison c4a046f7c4 see if we can find our parent find scripts as these were modified 2025-03-04 02:54:02 -05:00
Christopher Sean Morrison 8eb4776ce0 sync with main repo rev since it looks like it's more separated per line 2025-03-04 02:44:32 -05:00
Christopher Sean Morrison 0dcb158eab typo 2025-03-04 02:38:33 -05:00
Christopher Sean Morrison 685e77285f Mac frameworks are apparently deprecated in cmake, so rip out the logic.
long time since we built with system tcl/tk so will need to revisit the whole approach regardless.
2025-03-04 02:28:53 -05:00
Christopher Sean Morrison 650274859e promote not finding frameworks to all externals 2025-03-04 02:24:33 -05:00
Christopher Sean Morrison 3241e30ea9 make Geogram match project name to avoid warnings 2025-03-04 02:24:01 -05:00
Christopher Sean Morrison ea95b66680 match the package name to avoid warning 2025-03-04 02:11:58 -05:00
Christopher Sean Morrison b053baaf86 get default mac build working with libpng + system libz.
without enable_all=on, png was getting mixed signals as it wasn't defining the prefix (as there was a system libz), but then not actually adding the system libz to the link line.  result was unresolved zlib symbols.  this tell png to turn off libz building, so it'll use the system libz, if our parent config has building zlib turned off.
2025-02-26 01:45:05 -05:00
Christopher Sean Morrison 9d046fe578 force CC off but keep prior setting logged 2025-02-20 10:16:39 -05:00
Clifford Yapp 0c539a0395 Back up manifold upgrade - looks like we're not ready for 3.0 yet. 2025-02-19 16:24:00 -05:00
Clifford Yapp 7ac50ea0db Always enable optimized Manifold
Found out the hard way that a Debug manifold build without optimization is MUCH
slower - impractically slow when it comes to things like plate mode bot
offsetting.

In the (rare) event we really need something like understandable perf reporting
on Linux, this setting can be manually turned off in this file.
2025-02-19 09:35:34 -05:00
Clifford Yapp e466239372 Point Manifold at our local PUGIXML if enabled
Was getting a linking failure with pugixml - -lpugixml doesn't work out of the
box if we're using the bundled pugixml build.

Making a patch file for this - not worth pushing upstream, since the proper fix
in this particular case is to teach Manifold to read and write it's own
enhanced glTF files with topology info using the EXT_mesh_manifold extension.
If we can do that we should be able to completely remove the assimp dependency
from Manifold.
2025-02-19 08:58:43 -05:00
Clifford Yapp ceb224d5b5 Update Manifold submodule to v3.0.1 2025-02-19 08:24:58 -05:00
Christopher Sean Morrison 5277e71dac LICENSES.TXT apparently renamed to LICENSE 2025-02-13 12:02:20 -05:00
Christopher Sean Morrison ba8043ccdb updated manifold 2025-02-13 11:55:02 -05:00
Christopher Sean Morrison cf10cf56f1 lets try wiping out CC 2025-02-13 11:48:55 -05:00
Christopher Sean Morrison 1212ce9664 Merge branch 'main' of https://github.com/BRL-CAD/bext into HEAD 2025-02-06 14:43:30 -05:00
Christopher Sean Morrison 0a45216aff install script has same issue, needing vcvars in same env as nmake 2025-02-06 11:56:53 -05:00
Christopher Sean Morrison fa61afc565 see if we can narrow down the CC diff 2025-02-06 11:56:20 -05:00
Christopher Sean Morrison e18b1c12a7 see if we can fix the default Mac build 2025-02-06 10:59:16 -05:00
Christopher Sean Morrison eb1cb5346e looks like cmake cranks up the level, which results in misleading registry error output. suppress. 2025-02-06 10:58:56 -05:00
Christopher Sean Morrison bc693f8244 getting much closer. this ensures the vcvars are in same scope as nmake 2025-02-06 10:33:30 -05:00
Christopher Sean Morrison eb91894d69 extra lines skips directives 2025-02-06 10:32:37 -05:00
Christopher Sean Morrison d1832df2ad put the vcvars variables into the same context as nmake 2025-02-05 23:35:41 -05:00
Clifford Yapp 068f42ad92 Add some specifiers for build types to CMake lines 2025-02-04 11:48:32 -05:00
Clifford Yapp ed8a0febc2 Try running MSVC nmake install from a .cmake script 2025-02-04 07:03:47 -05:00
Christopher Sean Morrison a8e0ae9020 add logging to affirm the vcvars.bat 2025-01-29 20:40:05 -05:00
Christopher Sean Morrison a706f0f997 remove Mac LIBRARY_PATH override.
it causes tcl's configure to configure CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc which requires full definition of system include and lib search paths (i.e., more than LIBRARY_PATH).  it doesn't work otherwise, resulting in basic failures like not finding system headers.  even with CPATH set, still needs more.  default compiler works, so reverting to see if the previous issue has an alternate solution or was temporary.
2025-01-26 00:13:30 -05:00
Clifford Yapp 3948f11cf2 Add patch for geogram FreeBSD building
Based on patches from
https://cgit.freebsd.org/ports/tree/math/geogram

Needs testing.  OpenBSD (and possibly other BSDs) will probably need
their own set of patches along these lines.
2025-01-10 12:57:29 -05:00
Clifford Yapp 306f40246d See if we can enable position independent code across the board for zlib 2025-01-02 21:11:50 -05:00
Clifford Yapp e1435bdc0f Add note about doing initial work outside main 2024-12-23 11:00:30 -05:00
Clifford Yapp 861e6a4d7b Remove obsolete comment 2024-11-14 15:44:45 -05:00
22 changed files with 1577 additions and 1030 deletions
+23 -23
View File
@@ -12,75 +12,75 @@
# This module reads hints about the Geogram location from the following
# environment variables:
#
# GEOGRAM_INSTALL_PREFIX - Directory where Geogram is installed.
# Geogram_INSTALL_PREFIX - Directory where Geogram is installed.
#
# Authors: Jeremie Dumas
# Pierre Moulon
# Bruno Levy
set (GEOGRAM_SEARCH_PATHS
"${GEOGRAM_ROOT}"
${GEOGRAM_INSTALL_PREFIX}
"$ENV{GEOGRAM_INSTALL_PREFIX}"
set (Geogram_SEARCH_PATHS
"${Geogram_ROOT}"
${Geogram_INSTALL_PREFIX}
"$ENV{Geogram_INSTALL_PREFIX}"
"/usr/local/"
"$ENV{PROGRAMFILES}/Geogram"
"$ENV{PROGRAMW6432}/Geogram"
)
set (GEOGRAM_SEARCH_PATHS_SYSTEM
set (Geogram_SEARCH_PATHS_SYSTEM
"/usr/lib"
"/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}"
)
find_path (GEOGRAM_INCLUDE_DIR
find_path (Geogram_INCLUDE_DIR
geogram/basic/common.h
PATHS ${GEOGRAM_SEARCH_PATHS}
PATHS ${Geogram_SEARCH_PATHS}
PATH_SUFFIXES include/geogram1
)
find_library (GEOGRAM_LIBRARY
find_library (Geogram_LIBRARY
NAMES geogram
PATHS ${GEOGRAM_SEARCH_PATHS}
PATHS ${Geogram_SEARCH_PATHS}
PATH_SUFFIXES lib
)
find_library (GEOGRAM_GFX_LIBRARY
find_library (Geogram_GFX_LIBRARY
NAMES geogram_gfx
PATHS ${GEOGRAM_SEARCH_PATHS}
PATHS ${Geogram_SEARCH_PATHS}
PATH_SUFFIXES lib
)
# This one we search in both Geogram search path and
# system search path since it may be already installed
# in the system
find_library (GEOGRAM_GLFW3_LIBRARY
find_library (Geogram_GLFW3_LIBRARY
NAMES glfw3 glfw geogram_glfw3 glfw3dll glfwdll
PATHS ${GEOGRAM_SEARCH_PATHS} ${GEOGRAM_SEARCH_PATHS_SYSTEM}
PATHS ${Geogram_SEARCH_PATHS} ${Geogram_SEARCH_PATHS_SYSTEM}
PATH_SUFFIXES lib
)
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args(
GEOGRAM DEFAULT_MSG GEOGRAM_LIBRARY GEOGRAM_INCLUDE_DIR
Geogram DEFAULT_MSG Geogram_LIBRARY Geogram_INCLUDE_DIR
)
# Create an imported target for Geogram
If (GEOGRAM_FOUND)
If (Geogram_FOUND)
set(GEOGRAM_INSTALL_PREFIX ${GEOGRAM_INCLUDE_DIR}/../..)
set(Geogram_INSTALL_PREFIX ${Geogram_INCLUDE_DIR}/../..)
if (NOT TARGET Geogram::geogram)
add_library (Geogram::geogram UNKNOWN IMPORTED)
# Interface include directory
set_target_Properties(Geogram::geogram PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${GEOGRAM_INCLUDE_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${Geogram_INCLUDE_DIR}"
)
# Link to library file
Set_Target_Properties(Geogram::geogram PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GEOGRAM_LIBRARY}"
IMPORTED_LOCATION "${Geogram_LIBRARY}"
)
endif ()
@@ -88,18 +88,18 @@ If (GEOGRAM_FOUND)
add_library (Geogram::geogram_gfx UNKNOWN IMPORTED)
set_target_properties(Geogram::geogram_gfx PROPERTIES
INTERFACE_LINK_LIBRARIES ${GEOGRAM_GLFW3_LIBRARY}
INTERFACE_LINK_LIBRARIES ${Geogram_GLFW3_LIBRARY}
)
# Interface include directory
set_target_properties(Geogram::geogram_gfx PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${GEOGRAM_INCLUDE_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${Geogram_INCLUDE_DIR}"
)
# Link to library file
set_target_properties(Geogram::geogram_gfx PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
IMPORTED_LOCATION "${GEOGRAM_GFX_LIBRARY}"
IMPORTED_LOCATION "${Geogram_GFX_LIBRARY}"
)
endif ()
@@ -108,5 +108,5 @@ If (GEOGRAM_FOUND)
endif ()
# Hide variables from the default CMake-Gui options
mark_as_advanced (GEOGRAM_LIBRARY GEOGRAM_GFX_LIBRARY GEOGRAM_INCLUDE_DIR)
mark_as_advanced (Geogram_LIBRARY Geogram_GFX_LIBRARY Geogram_INCLUDE_DIR)
+7 -8
View File
@@ -2,23 +2,22 @@
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindTCL
-------
FindITCL
--------
This module finds if Tcl is installed and determines where the include
This module finds if Itcl is installed and determines where the include
files and libraries are. It also determines what the name of the
library is. This code sets the following variables:
::
ITCL_FOUND = Tcl was found
ITCL_LIBRARY = path to Tcl library (tcl tcl80)
ITCL_INCLUDE_PATH = path to where tcl.h can be found
ITCL_STUB_LIBRARY = path to Tcl stub library
ITCL_FOUND = Itcl was found
ITCL_LIBRARY = path to Itcl library (tcl tcl80)
ITCL_INCLUDE_PATH = path to where itcl.h can be found
ITCL_STUB_LIBRARY = path to Itcl stub library
#]=======================================================================]
include(CMakeFindFrameworks)
set(_ITCL_SEARCHES)
+276 -218
View File
@@ -34,7 +34,6 @@ TTK_STUB_LIBRARY = path to ttk stub library
#]=======================================================================]
include(CMakeFindFrameworks)
set(_TCL_SEARCHES)
@@ -48,8 +47,11 @@ if(WIN32)
get_filename_component(
ActiveTcl_CurrentVersion
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
NAME)
set(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS}
NAME
)
set(
TCLTK_POSSIBLE_BIN_PATHS
${TCLTK_POSSIBLE_BIN_PATHS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin"
@@ -57,13 +59,16 @@ if(WIN32)
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin"
)
)
get_filename_component(
ActiveTcl_CurrentVersion
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
NAME)
set(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
NAME
)
set(
TCLTK_POSSIBLE_LIB_PATHS
${TCLTK_POSSIBLE_LIB_PATHS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/lib"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib"
@@ -74,9 +79,11 @@ if(WIN32)
"$ENV{ProgramFiles}/Tcl/Lib"
"C:/Program Files/Tcl/lib"
"C:/Tcl/lib"
)
)
set(TCLTK_POSSIBLE_INCLUDE_PATHS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
set(
TCLTK_POSSIBLE_INCLUDE_PATHS
${TCLTK_POSSIBLE_INCLUDE_PATHS}
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/include"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/include"
@@ -87,20 +94,30 @@ if(WIN32)
"$ENV{ProgramFiles}/Tcl/include"
"C:/Program Files/Tcl/include"
"C:/Tcl/include"
)
)
endif()
set(TCL_TCLSH_NAMES
set(
TCL_TCLSH_NAMES
tclsh
tclsh${TCL_LIBRARY_VERSION} tclsh${TK_LIBRARY_VERSION} tclsh${TK_WISH_VERSION}
tclsh87 tclsh8.7
tclsh86 tclsh8.6
tclsh85 tclsh8.5
tclsh84 tclsh8.4
tclsh83 tclsh8.3
tclsh82 tclsh8.2
tclsh80 tclsh8.0
)
tclsh${TCL_LIBRARY_VERSION}
tclsh${TK_LIBRARY_VERSION}
tclsh${TK_WISH_VERSION}
tclsh87
tclsh8.7
tclsh86
tclsh8.6
tclsh85
tclsh8.5
tclsh84
tclsh8.4
tclsh83
tclsh8.3
tclsh82
tclsh8.2
tclsh80
tclsh8.0
)
if(CYGWIN)
set(TCL_TCLSH_NAMES ${TCL_TCLSH_NAMES} cygtclsh83 cygtclsh80)
endif(CYGWIN)
@@ -108,257 +125,298 @@ endif(CYGWIN)
foreach(search ${_TCL_SEARCHES})
find_program(TCL_TCLSH NAMES ${TCL_TCLSH_NAMES} ${${search}} PATH_SUFFIXES bin)
endforeach()
if (NOT TCL_TCLSH)
if(NOT TCL_TCLSH)
find_program(TCL_TCLSH NAMES ${TCL_TCLSH_NAMES} HINTS ${TCLTK_POSSIBLE_BIN_PATHS})
endif (NOT TCL_TCLSH)
endif(NOT TCL_TCLSH)
if (TCL_ENABLE_TK)
set(TK_WISH_NAMES
if(TCL_ENABLE_TK)
set(
TK_WISH_NAMES
wish
wish${TCL_LIBRARY_VERSION} wish${TK_LIBRARY_VERSION} wish${TCL_TCLSH_VERSION}
wish86 wish8.6
wish85 wish8.5
wish84 wish8.4
wish83 wish8.3
wish82 wish8.2
wish80 wish8.0
)
wish${TCL_LIBRARY_VERSION}
wish${TK_LIBRARY_VERSION}
wish${TCL_TCLSH_VERSION}
wish86
wish8.6
wish85
wish8.5
wish84
wish8.4
wish83
wish8.3
wish82
wish8.2
wish80
wish8.0
)
if(CYGWIN)
set(TK_WISH_NAMES ${TK_WISH_NAMES} cygwish80 )
set(TK_WISH_NAMES ${TK_WISH_NAMES} cygwish80)
endif()
foreach(search ${_TCL_SEARCHES})
find_program(TK_WISH NAMES ${TK_WISH_NAMES} ${${search}} PATH_SUFFIXES bin)
endforeach()
if (NOT TK_WISH)
find_program(TK_WISH NAMES ${TK_WISH_NAMES} HINTS ${TCLTK_POSSIBLE_BIN_PATHS})
endif (NOT TK_WISH)
endif (TCL_ENABLE_TK)
if(NOT TK_WISH)
find_program(TK_WISH NAMES ${TK_WISH_NAMES} HINTS ${TCLTK_POSSIBLE_BIN_PATHS})
endif(NOT TK_WISH)
endif(TCL_ENABLE_TK)
if(TCLSH_VERSION_STRING)
set(TCL_TCLSH_VERSION "${TCLSH_VERSION_STRING}")
else()
get_filename_component(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
get_filename_component(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
string(REGEX REPLACE
"^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}")
string(REGEX REPLACE "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}")
endif()
set(TCLTK_POSSIBLE_LIB_PATHS
"${TCL_INCLUDE_PATH_PARENT}/lib"
"${TCL_LIBRARY_PATH}"
"${TCL_TCLSH_PATH_PARENT}/lib"
)
if (TCL_ENABLE_TK)
set(TCLTK_POSSIBLE_LIB_PATHS
set(TCLTK_POSSIBLE_LIB_PATHS "${TCL_INCLUDE_PATH_PARENT}/lib" "${TCL_LIBRARY_PATH}" "${TCL_TCLSH_PATH_PARENT}/lib")
if(TCL_ENABLE_TK)
set(
TCLTK_POSSIBLE_LIB_PATHS
${TCLTK_POSSIBLE_LIB_PATHS}
"${TK_INCLUDE_PATH_PARENT}/lib"
"${TK_LIBRARY_PATH}"
"${TK_WISH_PATH_PARENT}/lib"
)
endif (TCL_ENABLE_TK)
)
endif(TCL_ENABLE_TK)
set(TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
set(
TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
lib
lib/tcl
lib/tcl/tcl8.7
lib/tcl/tcl8.6
lib/tcl/tcl8.5
lib/tcl/tcl8.4
)
if (TCL_ENABLE_TK)
set(TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
)
if(TCL_ENABLE_TK)
set(
TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
lib/tcl/tk8.7
lib/tcl/tk8.6
lib/tcl/tk8.5
lib/tcl/tk8.4
)
endif (TCL_ENABLE_TK)
set(TCL_POSSIBLE_LIB_NAMES
tcl
tcl${TCL_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION}
tcl87 tcl8.7 tcl87t tcl8.7t
tcl86 tcl8.6 tcl86t tcl8.6t
tcl85 tcl8.5
tcl84 tcl8.4
tcl83 tcl8.3
tcl82 tcl8.2
tcl80 tcl8.0
)
endif(TCL_ENABLE_TK)
set(
TCL_POSSIBLE_LIB_NAMES
tcl
tcl${TCL_LIBRARY_VERSION}
tcl${TCL_TCLSH_VERSION}
tcl${TK_WISH_VERSION}
tcl87
tcl8.7
tcl87t
tcl8.7t
tcl86
tcl8.6
tcl86t
tcl8.6t
tcl85
tcl8.5
tcl84
tcl8.4
tcl83
tcl8.3
tcl82
tcl8.2
tcl80
tcl8.0
)
if(NOT TCL_LIBRARY)
foreach(search ${_TCL_SEARCHES})
find_library(TCL_LIBRARY
find_library(
TCL_LIBRARY
NAMES ${TCL_POSSIBLE_LIB_NAMES}
NAMES_PER_DIR ${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES})
NAMES_PER_DIR
${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
endforeach()
endif()
if(NOT TCL_LIBRARY)
find_library(TCL_LIBRARY
find_library(
TCL_LIBRARY
NAMES ${TCL_POSSIBLE_LIB_NAMES}
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
)
endif(NOT TCL_LIBRARY)
set(TCLSTUB_POSSIBLE_LIB_NAMES
set(
TCLSTUB_POSSIBLE_LIB_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
)
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
)
if(NOT TCL_STUB_LIBRARY)
foreach(search ${_TCL_SEARCHES})
find_library(TCL_STUB_LIBRARY
find_library(
TCL_STUB_LIBRARY
NAMES ${TCLSTUB_POSSIBLE_LIB_NAMES}
NAMES_PER_DIR ${${search}}
NAMES_PER_DIR
${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
)
endforeach()
endif()
if(NOT TCL_STUB_LIBRARY)
find_library(TCL_STUB_LIBRARY
NAMES ${TCLSTUB_POSSIBLE_LIB_NAMES}
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)
find_library(TCL_STUB_LIBRARY NAMES ${TCLSTUB_POSSIBLE_LIB_NAMES} PATHS ${TCLTK_POSSIBLE_LIB_PATHS})
endif()
if (TCL_ENABLE_TK)
set(TK_POSSIBLE_LIB_NAMES
if(TCL_ENABLE_TK)
set(
TK_POSSIBLE_LIB_NAMES
tk
tk${TK_LIBRARY_VERSION} tk${TCL_TCLSH_VERSION} tk${TK_WISH_VERSION}
tk87 tk8.7 tk87t tk8.7t
tk86 tk8.6 tk86t tk8.6t
tk85 tk8.5
tk84 tk8.4
tk83 tk8.3
tk82 tk8.2
tk80 tk8.0
)
tk${TK_LIBRARY_VERSION}
tk${TCL_TCLSH_VERSION}
tk${TK_WISH_VERSION}
tk87
tk8.7
tk87t
tk8.7t
tk86
tk8.6
tk86t
tk8.6t
tk85
tk8.5
tk84
tk8.4
tk83
tk8.3
tk82
tk8.2
tk80
tk8.0
)
if(NOT TK_LIBRARY)
foreach(search ${_TCL_SEARCHES})
find_library(TK_LIBRARY
NAMES ${TK_POSSIBLE_LIB_NAMES}
NAMES_PER_DIR ${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
find_library(
TK_LIBRARY
NAMES ${TK_POSSIBLE_LIB_NAMES}
NAMES_PER_DIR
${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
endforeach()
endif()
if(NOT TK_LIBRARY)
find_library(TK_LIBRARY
find_library(
TK_LIBRARY
NAMES ${TK_POSSIBLE_LIB_NAMES}
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
)
endif(NOT TK_LIBRARY)
set(TK_STUB_POSSIBLE_LIB_NAMES
set(
TK_STUB_POSSIBLE_LIB_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
)
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
)
if(NOT TK_STUB_LIBRARY)
foreach(search ${_TCL_SEARCHES})
find_library(TK_STUB_LIBRARY
NAMES ${TK_STUB_POSSIBLE_LIB_NAMES}
NAMES_PER_DIR ${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
find_library(
TK_STUB_LIBRARY
NAMES ${TK_STUB_POSSIBLE_LIB_NAMES}
NAMES_PER_DIR
${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
endforeach()
endif()
if(NOT TK_STUB_LIBRARY)
find_library(TK_STUB_LIBRARY
NAMES ${TK_STUB_POSSIBLE_LIB_NAMES}
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)
find_library(TK_STUB_LIBRARY NAMES ${TK_STUB_POSSIBLE_LIB_NAMES} PATHS ${TCLTK_POSSIBLE_LIB_PATHS})
endif()
set(TTK_STUB_POSSIBLE_LIB_NAMES
set(
TTK_STUB_POSSIBLE_LIB_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
)
ttkstub${TCL_LIBRARY_VERSION}
ttkstub${TCL_TCLSH_VERSION}
ttkstub${TK_WISH_VERSION}
ttkstub88
ttkstub8.8
ttkstub87
ttkstub8.7
ttkstub86
ttkstub8.6
ttkstub85
ttkstub8.5
)
if(NOT TTK_STUB_LIBRARY)
foreach(search ${_TCL_SEARCHES})
find_library(TTK_STUB_LIBRARY
NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES}
NAMES_PER_DIR ${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
find_library(
TTK_STUB_LIBRARY
NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES}
NAMES_PER_DIR
${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
endforeach()
endif()
if(NOT TTK_STUB_LIBRARY)
find_library(TTK_STUB_LIBRARY
NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES}
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
)
find_library(TTK_STUB_LIBRARY NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES} PATHS ${TCLTK_POSSIBLE_LIB_PATHS})
endif()
endif (TCL_ENABLE_TK)
endif(TCL_ENABLE_TK)
CMAKE_FIND_FRAMEWORKS(Tcl)
if (TCL_ENABLE_TK)
CMAKE_FIND_FRAMEWORKS(Tk)
endif (TCL_ENABLE_TK)
set(TCL_FRAMEWORK_INCLUDES)
if(Tcl_FRAMEWORKS)
if(NOT TCL_INCLUDE_PATH)
foreach(dir ${Tcl_FRAMEWORKS})
set(TCL_FRAMEWORK_INCLUDES ${TCL_FRAMEWORK_INCLUDES} ${dir}/Headers)
endforeach()
endif()
endif()
if (TCL_ENABLE_TK)
set(TK_FRAMEWORK_INCLUDES)
if(Tk_FRAMEWORKS)
if(NOT TK_INCLUDE_PATH)
foreach(dir ${Tk_FRAMEWORKS})
set(TK_FRAMEWORK_INCLUDES ${TK_FRAMEWORK_INCLUDES}
${dir}/Headers ${dir}/PrivateHeaders)
endforeach()
endif()
endif()
endif (TCL_ENABLE_TK)
set(TCLTK_POSSIBLE_INCLUDE_PATHS
set(
TCLTK_POSSIBLE_INCLUDE_PATHS
"${TCL_LIBRARY_PATH_PARENT}/include"
"${TCL_INCLUDE_PATH}"
${TCL_FRAMEWORK_INCLUDES}
"${TCL_TCLSH_PATH_PARENT}/include"
)
if (TCL_ENABLE_TK)
set(TCLTK_POSSIBLE_INCLUDE_PATHS
)
if(TCL_ENABLE_TK)
set(
TCLTK_POSSIBLE_INCLUDE_PATHS
${TCLTK_POSSIBLE_INCLUDE_PATHS}
"${TCL_LIBRARY_PATH_PARENT}/include"
"${TCL_INCLUDE_PATH}"
${TCL_FRAMEWORK_INCLUDES}
"${TCL_TCLSH_PATH_PARENT}/include"
)
endif (TCL_ENABLE_TK)
)
endif(TCL_ENABLE_TK)
set(TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
set(
TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
include
include/tcl${TCL_LIBRARY_VERSION}
include/tcl8.7
@@ -368,73 +426,71 @@ set(TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
include/tcl8.3
include/tcl8.2
include/tcl8.0
)
)
if (TCL_ENABLE_TK)
set(TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
if(TCL_ENABLE_TK)
set(
TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
include/tcl${TK_LIBRARY_VERSION}
include/tk8.7
include/tk8.6
include/tk8.5
include/tk8.4
)
endif (TCL_ENABLE_TK)
)
endif(TCL_ENABLE_TK)
foreach(search ${_TCL_SEARCHES})
find_path(TCL_INCLUDE_PATH
NAMES tcl.h ${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
)
find_path(TCL_INCLUDE_PATH NAMES tcl.h ${${search}} PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES})
endforeach()
if (NOT TCL_INCLUDE_PATH)
find_path(TCL_INCLUDE_PATH
if(NOT TCL_INCLUDE_PATH)
find_path(
TCL_INCLUDE_PATH
NAMES tcl.h
HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
)
)
endif()
if (TCL_ENABLE_TK)
if(TCL_ENABLE_TK)
foreach(search ${_TCL_SEARCHES})
find_path(TK_INCLUDE_PATH
NAMES tk.h ${${search}}
PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
)
find_path(TK_INCLUDE_PATH NAMES tk.h ${${search}} PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES})
endforeach()
if (NOT TK_INCLUDE_PATH)
find_path(TK_INCLUDE_PATH
if(NOT TK_INCLUDE_PATH)
find_path(
TK_INCLUDE_PATH
NAMES tk.h
HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
)
)
endif()
# IFF we have TCL_TK_SYSTEM_GRAPHICS set and have a system TK_WISH, check that the
# windowing system matches the specified type
if (NOT "${TCL_TK_SYSTEM_GRAPHICS}" STREQUAL "" AND TK_WISH AND NOT TARGET "${TK_WISH}")
set(tkwin_script "
if(NOT "${TCL_TK_SYSTEM_GRAPHICS}" STREQUAL "" AND TK_WISH AND NOT TARGET "${TK_WISH}")
set(
tkwin_script
"
set filename \"${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM\"
set fileId [open $filename \"w\"]
set windowingsystem [tk windowingsystem]
puts $fileId $windowingsystem
close $fileId
exit
")
"
)
set(tkwin_scriptfile "${CMAKE_BINARY_DIR}/CMakeTmp/tk_windowingsystem.tcl")
set(WSYS "wm-NOTFOUND")
file(WRITE ${tkwin_scriptfile} ${tkwin_script})
execute_process(COMMAND ${TK_WISH} ${tkwin_scriptfile} OUTPUT_VARIABLE EXECOUTPUT)
if (EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM")
if(EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM")
file(READ "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM" readresultvar)
string(REGEX REPLACE "\n" "" WSYS "${readresultvar}")
endif (EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM")
endif(EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM")
# If we have no information about the windowing system or it does not match
# a specified system, the find_package detection has failed
if (NOT "${WSYS}" STREQUAL "${TCL_TK_SYSTEM_GRAPHICS}")
if(NOT "${WSYS}" STREQUAL "${TCL_TK_SYSTEM_GRAPHICS}")
unset(TCL_LIBRARY CACHE)
unset(TCL_STUB_LIBRARY CACHE)
unset(TK_LIBRARY CACHE)
@@ -452,28 +508,31 @@ if (TCL_ENABLE_TK)
unset(TCL_STUB_LIBRARY CACHE)
unset(TK_STUB_LIBRARY CACHE)
unset(TTK_STUB_LIBRARY CACHE)
endif (NOT "${WSYS}" STREQUAL "${TCL_TK_SYSTEM_GRAPHICS}")
endif (NOT "${TCL_TK_SYSTEM_GRAPHICS}" STREQUAL "" AND TK_WISH AND NOT TARGET "${TK_WISH}")
endif (TCL_ENABLE_TK)
endif(NOT "${WSYS}" STREQUAL "${TCL_TK_SYSTEM_GRAPHICS}")
endif(NOT "${TCL_TK_SYSTEM_GRAPHICS}" STREQUAL "" AND TK_WISH AND NOT TARGET "${TK_WISH}")
endif(TCL_ENABLE_TK)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL
find_package_handle_standard_args(
TCL
REQUIRED_VARS TCL_LIBRARY TCL_STUB_LIBRARY TCL_INCLUDE_PATH TCL_TCLSH
VERSION_VAR TCLSH_VERSION_STRING)
VERSION_VAR TCLSH_VERSION_STRING
)
if (TCL_ENABLE_TK)
if(TCL_ENABLE_TK)
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_STUB_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY TK_STUB_LIBRARY TK_INCLUDE_PATH)
set(TCLTK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
find_package_handle_standard_args(
TCLTK
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_STUB_LIBRARY TK_INCLUDE_PATH TK_WISH)
set(TK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
find_package_handle_standard_args(TK REQUIRED_VARS TK_LIBRARY TK_STUB_LIBRARY TK_INCLUDE_PATH TK_WISH)
unset(FPHSA_NAME_MISMATCHED)
endif (TCL_ENABLE_TK)
endif(TCL_ENABLE_TK)
mark_as_advanced(
TCL_INCLUDE_PATH
@@ -485,8 +544,7 @@ mark_as_advanced(
TK_STUB_LIBRARY
TK_WISH
TTK_STUB_LIBRARY
)
)
# Local Variables:
# tab-width: 8
+12 -19
View File
@@ -73,6 +73,10 @@ endif(CMAKE_CONFIGURATION_TYPES)
mark_as_advanced(CMAKE_BUILD_TYPE)
mark_as_advanced(CMAKE_CONFIGURATION_TYPES)
# Frameworks are deprecated in CMake, so avoid finding them
set(CMAKE_FIND_FRAMEWORK NEVER)
#------------------------------------------------------------------------------
# Once we do a run, we want our ENABLE_ALL setting to be consistent in
# subsequent CMake runs
@@ -118,29 +122,18 @@ endif(NOT DEFINED DATA_DIR)
# directory to hold both of these outputs, and we want it to be in a standard
# location that other projects will know to look for.
# Try to get the home directory
set(ENV_HOME "$ENV{HOME}")
if (NOT ENV_HOME)
set(ENV_HOME "$ENV{USERPROFILE}")
endif (NOT ENV_HOME)
# If we're not being forced to a specific location
# and we know where home is, use it
# Default to the build directory for output and installation
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${ENV_HOME}")
set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE PATH "default install path" FORCE)
endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# If home didn't work, fall back on the build directory
if (NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}")
endif (NOT CMAKE_INSTALL_PREFIX)
# Having decided on the path, make sure subsequent configures stick with it
# Make sure subsequent configures stick with the same installation path, whether specified or not
set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" CACHE PATH "Calculated or specified install prefix" FORCE)
set(BEXT_ROOT bext_output)
set(CMAKE_BUNDLE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${BEXT_ROOT}/install" CACHE PATH "Outputs for bundling" FORCE)
set(CMAKE_NOBUNDLE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${BEXT_ROOT}/noinstall" CACHE PATH "Build tools NOT intended for bundling" FORCE)
message("prefix is ${CMAKE_INSTALL_PREFIX}")
set(CMAKE_BUNDLE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/install" CACHE PATH "Outputs for bundling" FORCE)
set(CMAKE_NOBUNDLE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/noinstall" CACHE PATH "Build tools NOT intended for bundling" FORCE)
file(MAKE_DIRECTORY "${CMAKE_BUNDLE_INSTALL_PREFIX}")
file(MAKE_DIRECTORY "${CMAKE_NOBUNDLE_INSTALL_PREFIX}")
@@ -508,7 +501,7 @@ endif (WIN32)
###############################################################################
# Report where we will be putting our output
###############################################################################
message("Output directory: ${CMAKE_INSTALL_PREFIX}/${BEXT_ROOT}")
message("Output directory: ${CMAKE_INSTALL_PREFIX}")
# Local Variables:
# tab-width: 8
+9 -2
View File
@@ -77,6 +77,13 @@ Your branch is up to date with 'origin/rel-7-40-2'.
# Adding a submodule (using Tcl as an example)
NOTE: When testing out new possible dependencies for BEXT, work should be done in
a branch first and then merged into main. Once part of the main history, we can't
remove a dependency repository without breaking bext history - thus, we only want to
add dependencies we're actually going to use for implementing live features. Exploratory
work that might be thrown away is outside of bext's 'main' branch scope.
```
user@linux:~/bext (main) $ cd tcl
user@linux:~/bext/tcl (main) $ git submodule add -b RELEASE https://github.com/BRL-CAD/tcl.git
@@ -552,7 +559,7 @@ optional third party components:
```
geogram (RELEASE)$ mkdir build && cd build
build (RELEASE)$ cmake .. -DGEOGRAM_LIB_ONLY=ON -DGEOGRAM_WITH_GRAPHICS=OFF -DGEOGRAM_WITH_LUA=OFF -DGEOGRAM_WITH_HLBFGS=OFF -DGEOGRAM_WITH_TETGEN=OFF -DGEOGRAM_WITH_TRIANGLE=OFF
build (RELEASE)$ cmake .. -DGEOGRAM_LIB_ONLY=ON -DGEOGRAM_WITH_GRAPHICS=OFF -DGEOGRAM_WITH_LUA=OFF -DGEOGRAM_WITH_HLBFGS=OFF -DGEOGRAM_WITH_TETGEN=OFF -DGEOGRAM_WITH_TRIANGLE=OFF -DCMAKE_BUILD_TYPE=Release
CMake Deprecation Warning at CMakeLists.txt:5 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
@@ -735,7 +742,7 @@ so we run make with the GEOGRAM_BLD target.
```
bext (main) $ cp -r ~/geogram geogram/
bext (main) $ mkdir build && cd build
build (main) $ cmake .. -DENABLE_ALL=ON
build (main) $ cmake .. -DENABLE_ALL=ON -DCMAKE_BUILD_TYPE=Release
build (main) $ make GEOGRAM_BLD
[ 0%] Creating directories for 'PATCH_BLD'
[ 0%] No download step for 'PATCH_BLD'
+2 -2
View File
@@ -15,7 +15,7 @@ mkdir bext_build && cd bext_build
```
* Configure with CMake. Individual components can be enabled or disabled, but the ENABLE_ALL flag is used to automatically turn on all the projects. There are also USE_* variables that can enable or disable various groupings of components based on which specific application stacks the user wishes to support.
```sh
cmake ../bext -DENABLE_ALL=ON
cmake ../bext -DENABLE_ALL=ON -DCMAKE_BUILD_TYPE=Release
```
* Run the build process.
```sh
@@ -61,7 +61,7 @@ cd .. && mkdir brlcad_exttest_build && cd brlcad_exttest_build
```
* Configure with CMake, specifying the path holding the bext output directory the BRLCAD_EXT_DIR variable to locate bext_output. Unless you have overridden the CMAKE_INSTALL_PREFIX of the bext build, it will be located in your home directory. The bext_output directory should in turn contain install and noinstall folders. If you also wish to test with Qt, you must currently enable that support in BRL-CAD as well. (Note that the BRL-CAD configure process is responsible for staging the BRLCAD_EXT_DIR contents into the build directory, so it can take some time to complete...)
```sh
cmake ../brlcad -DBRLCAD_EXT_DIR=<your_bext_install_dir>/bext_output -DBRLCAD_ENABLE_QT=ON
cmake ../brlcad -DBRLCAD_EXT_DIR=<your_bext_install_dir>/bext_output -DBRLCAD_ENABLE_QT=ON -DCMAKE_BUILD_TYPE=Release
```
* Run the build process.
```sh
+1 -1
View File
@@ -1,4 +1,4 @@
# Decide if we're using assetimport - used by Manifold which is used by librt.
# Decide if we're using assetimport.
# Also, assetimport is used directly by a libgcv plugin
cad_enable(ASSETIMPORT "libgcv")
+12
View File
@@ -268,3 +268,15 @@ diff -Naur ASSETIMPORT/code/CMakeLists.txt ASSETIMPORT_BLD/code/CMakeLists.txt
)
if (APPLE)
diff -Naur assimp/include/assimp/ParsingUtils.h ASSETIMPORT_BLD/include/assimp/ParsingUtils.h
--- assimp/include/assimp/ParsingUtils.h 2025-03-13 14:04:31.626017442 -0400
+++ ASSETIMPORT_BLD/include/assimp/ParsingUtils.h 2025-03-13 14:05:20.877847011 -0400
@@ -167,7 +167,7 @@
}
*_out = (char_t)'\0';
- while (IsLineEnd(*buffer) && '\0' != *buffer) {
+ while (IsLineEnd(*buffer) && '\0' != *buffer && buffer != end) {
++buffer;
}
+1
View File
@@ -16,6 +16,7 @@ if (ENABLE_GEOGRAM)
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
PATCH_COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/geogram_cmake.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/geogram_win32.patch
COMMAND ${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/geogram_freebsd.patch
CMAKE_ARGS
${BUILD_TYPE_SPECIFIER}
-DBIN_DIR=${BIN_DIR}
+298
View File
@@ -0,0 +1,298 @@
diff -Naur GEOGRAM_BLD/cmake/platforms/FreeBSD/config.cmake GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD/config.cmake
--- GEOGRAM_BLD/cmake/platforms/FreeBSD/config.cmake 1969-12-31 19:00:00.000000000 -0500
+++ GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD/config.cmake 2025-01-10 12:46:26.972144880 -0500
@@ -0,0 +1,5 @@
+set(VORPALINE_ARCH_64 true)
+include(${GEOGRAM_SOURCE_DIR}/cmake/platforms/FreeBSD-clang.cmake)
+#add_flags(CMAKE_CXX_FLAGS -m64)
+#add_flags(CMAKE_C_FLAGS -m64)
+
diff -Naur GEOGRAM_BLD/cmake/platforms/FreeBSD/setvars.sh GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD/setvars.sh
--- GEOGRAM_BLD/cmake/platforms/FreeBSD/setvars.sh 1969-12-31 19:00:00.000000000 -0500
+++ GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD/setvars.sh 2025-01-10 12:46:26.972144880 -0500
@@ -0,0 +1,2 @@
+#export CC=clang
+#export CXX=clang++
diff -Naur GEOGRAM_BLD/cmake/platforms/FreeBSD-clang.cmake GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD-clang.cmake
--- GEOGRAM_BLD/cmake/platforms/FreeBSD-clang.cmake 1969-12-31 19:00:00.000000000 -0500
+++ GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD-clang.cmake 2025-01-10 12:46:26.972144880 -0500
@@ -0,0 +1,153 @@
+###
+### Adopted from cmake/platforms/Linux-clang.cmake
+###
+
+#-------------------------------------------------------------------
+# Flags common to all FreeBSD based platforms with Clang compiler
+#-------------------------------------------------------------------
+
+include(${GEOGRAM_SOURCE_DIR}/cmake/platforms/FreeBSD.cmake)
+
+# Warning flags
+set(NORMAL_WARNINGS -Wall -Wextra)
+
+set(FULL_WARNINGS
+ -Weverything
+ -Wno-padded # Disable generating a message each time padding is used
+ -Wno-float-equal # Sometimes we compare floats (against 0.0 or 1.0 mainly)
+ -Wno-global-constructors
+ -Wno-exit-time-destructors
+ -Wno-old-style-cast # Yes, old-style cast is sometime more legible...
+ -Wno-format-nonliteral # Todo: use Laurent Alonso's trick
+ -Wno-disabled-macro-expansion # Else it complains with stderr
+)
+
+# Compile with full warnings by default
+add_definitions(${FULL_WARNINGS})
+
+# Run the static analyzer
+if(VORPALINE_WITH_CLANGSA)
+ add_definitions(--analyze)
+endif()
+
+# I do not know where this -Wno-maybe-uninitialized comes from
+# (but clang does not understand it), silence the warning for
+# now...
+add_flags(CMAKE_CXX_FLAGS -Wno-unknown-warning-option)
+add_flags(CMAKE_C_FLAGS -Wno-unknown-warning-option)
+
+# Add static and dynamic bounds checks (optimization required)
+#add_flags(CMAKE_CXX_FLAGS_RELEASE -D_FORTIFY_SOURCE=2)
+#add_flags(CMAKE_C_FLAGS_RELEASE -D_FORTIFY_SOURCE=2)
+
+# Enable SSE3 instruction set
+add_flags(CMAKE_CXX_FLAGS -msse3)
+add_flags(CMAKE_C_FLAGS -msse3)
+
+# C++11 standard
+add_flags(CMAKE_CXX_FLAGS -Qunused-arguments -std=c++11 -Wno-c++98-compat)
+
+# Enable glibc parallel mode
+#add_flags(CMAKE_CXX_FLAGS -D_GLIBCXX_PARALLEL)
+
+
+# Generate debug information even in release mode
+#add_flags(CMAKE_CXX_FLAGS_RELEASE -g)
+#add_flags(CMAKE_C_FLAGS_RELEASE -g)
+
+
+# Additional debug flags
+# deactivated for now: I added bound checking in VOR::vector<>.
+#add_flags(CMAKE_CXX_FLAGS_DEBUG -D_GLIBCXX_DEBUG)
+
+
+# Compile and link with OpenMP ** NOT YET SUPPORTED in clang 3 **
+#add_flags(CMAKE_CXX_FLAGS -fopenmp)
+#add_flags(CMAKE_C_FLAGS -fopenmp)
+
+
+# Profiler compilation flags
+if(VORPALINE_WITH_GPROF)
+ message(FATAL_ERROR "Profiling is not (yet) available with clang")
+ message(STATUS "Building for code profiling")
+ #add_flags(CMAKE_CXX_FLAGS -pg -DPROFILER)
+ #add_flags(CMAKE_C_FLAGS -pg -DPROFILER)
+endif()
+
+
+# Code coverage compilation flags
+if(VORPALINE_WITH_GCOV)
+ message(STATUS "Building for coverage analysis")
+ add_flags(CMAKE_CXX_FLAGS --coverage)
+ add_flags(CMAKE_C_FLAGS --coverage)
+endif()
+
+
+# Compilation flags for Google's AddressSanitizer
+# These flags can only be specified for dynamic builds
+if(VORPALINE_WITH_ASAN)
+ if(VORPALINE_BUILD_DYNAMIC)
+ message(STATUS "Building with AddressSanitizer (debug only)")
+ add_flags(CMAKE_CXX_FLAGS_DEBUG -fsanitize=address -fno-omit-frame-pointer)
+ add_flags(CMAKE_C_FLAGS_DEBUG -fsanitize=address -fno-omit-frame-pointer)
+ else()
+ message(WARNING "AddressSanitizer can be used with dynamic builds only")
+ set(VORPALINE_WITH_ASAN false)
+ endif()
+endif()
+if(NOT VORPALINE_WITH_ASAN)
+ # Use native GCC stack smash Protection and buffer overflow detection (debug only)
+ add_flags(CMAKE_CXX_FLAGS_DEBUG -fstack-protector-all)
+ add_flags(CMAKE_C_FLAGS_DEBUG -fstack-protector-all)
+endif()
+
+
+# Compilation flags for Google's ThreadSanitizer
+# Does not work for the moment: cannot figure out how to link with library libtsan
+if(VORPALINE_WITH_TSAN)
+ message(STATUS "Building with ThreadSanitizer (debug only)")
+ message(FATAL_ERROR "ThreadSanitizer is not available: cannot figure out how to link with library libtsan")
+ add_flags(CMAKE_CXX_FLAGS_DEBUG -fsanitize=thread)
+ add_flags(CMAKE_C_FLAGS_DEBUG -fsanitize=thread)
+ if(NOT VORPALINE_BUILD_DYNAMIC)
+ add_flags(CMAKE_EXE_LINKER_FLAGS -static-libtsan)
+ endif()
+endif()
+
+
+# Reset the warning level for third parties
+function(vor_reset_warning_level)
+ remove_definitions(${FULL_WARNINGS})
+ add_definitions(${NORMAL_WARNINGS})
+endfunction()
+
+macro(vor_add_executable)
+ if(NOT VORPALINE_BUILD_DYNAMIC)
+ # Create a statically linked executable
+ # Link with static libraries
+ add_flags(CMAKE_CXX_FLAGS -static)
+ add_flags(CMAKE_C_FLAGS -static)
+ endif()
+
+ add_executable(${ARGN})
+
+ if(NOT VORPALINE_BUILD_DYNAMIC AND DEFINED VORPALINE_WITH_DDT)
+ # Static builds running with Allinea's DDT must be linked with a
+ # special malloc library which replaces the malloc primitives of
+ # the Glibc (We must allow multiple definitions)
+ add_flags(CMAKE_EXE_LINKER_FLAGS -Wl,--allow-multiple-definition)
+
+ if(VORPALINE_ARCH_64)
+ link_directories(${VORPALINE_WITH_DDT}/lib/64)
+ else()
+ link_directories(${VORPALINE_WITH_DDT}/lib/32)
+ endif()
+ target_link_libraries(${ARGV0} dmallocthcxx)
+ endif()
+
+ if(UNIX)
+ target_link_libraries(${ARGV0} m pthread)
+ endif()
+
+endmacro()
+
diff -Naur GEOGRAM_BLD/cmake/platforms/FreeBSD.cmake GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD.cmake
--- GEOGRAM_BLD/cmake/platforms/FreeBSD.cmake 1969-12-31 19:00:00.000000000 -0500
+++ GEOGRAM_BLD_bsd/cmake/platforms/FreeBSD.cmake 2025-01-10 12:46:26.972144880 -0500
@@ -0,0 +1,23 @@
+###
+### Adopted from cmake/platforms/Linux.cmake
+###
+
+#-------------------------------------------------------------------
+# Flags common to all Linux based platforms
+#-------------------------------------------------------------------
+
+# Shell script extension
+set(SHELL_SUFFIX "sh")
+
+# This flag MUST be added to solve a bug related to shared lib dynamic loading
+# (std::type_infos representing the same template type do not compare equal,
+# introducing subtle bugs)
+# IMPORTANT: DO NOT ADD THIS FLAG WITH STATIC LINKING
+#add_flags(CMAKE_EXE_LINKER_FLAGS "-Wl,-E")
+
+# Forbid undefined symbols at link time (shared libraries and executables)
+add_flags(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
+add_flags(CMAKE_EXE_LINKER_FLAGS "-Wl,--no-undefined")
+
+# Link with the loader library
+list(APPEND SYSLIBS ${CMAKE_DL_LIBS})
diff -Naur GEOGRAM_BLD/CMakeLists.txt GEOGRAM_BLD_bsd/CMakeLists.txt
--- GEOGRAM_BLD/CMakeLists.txt 2025-01-10 12:45:04.545610329 -0500
+++ GEOGRAM_BLD_bsd/CMakeLists.txt 2025-01-10 12:46:50.785730894 -0500
@@ -129,7 +129,7 @@
add_subdirectory(tests)
endif()
-add_subdirectory(doc)
+#add_subdirectory(doc)
##############################################################################
# Cleanup from previous builds
diff -Naur GEOGRAM_BLD/src/lib/geogram/basic/algorithm.h GEOGRAM_BLD_bsd/src/lib/geogram/basic/algorithm.h
--- GEOGRAM_BLD/src/lib/geogram/basic/algorithm.h 2025-01-10 12:45:04.472611652 -0500
+++ GEOGRAM_BLD_bsd/src/lib/geogram/basic/algorithm.h 2025-01-10 12:46:26.972144880 -0500
@@ -42,7 +42,7 @@
#include <geogram/basic/common.h>
-#if defined(GEO_OS_LINUX) && defined(GEO_OPENMP)
+#if (defined(GEO_OS_LINUX) || defined(GEO_OS_FREEBSD)) && defined(GEO_OPENMP)
#if (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 4) && !defined(GEO_OS_ANDROID)
#include <parallel/algorithm>
#define GEO_USE_GCC_PARALLEL_STL
diff -Naur GEOGRAM_BLD/src/lib/geogram/basic/command_line.cpp GEOGRAM_BLD_bsd/src/lib/geogram/basic/command_line.cpp
--- GEOGRAM_BLD/src/lib/geogram/basic/command_line.cpp 2025-01-10 12:45:04.473611634 -0500
+++ GEOGRAM_BLD_bsd/src/lib/geogram/basic/command_line.cpp 2025-01-10 12:46:26.973144862 -0500
@@ -49,7 +49,7 @@
#include <iostream>
#include <iomanip>
-#if defined(GEO_OS_LINUX) || defined(GEO_OS_APPLE)
+#if defined(GEO_OS_LINUX) || defined(GEO_OS_FREEBSD) || defined(GEO_OS_APPLE)
#include <sys/ioctl.h>
#include <stdio.h>
#include <unistd.h>
diff -Naur GEOGRAM_BLD/src/lib/geogram/basic/common.h GEOGRAM_BLD_bsd/src/lib/geogram/basic/common.h
--- GEOGRAM_BLD/src/lib/geogram/basic/common.h 2025-01-10 12:45:04.473611634 -0500
+++ GEOGRAM_BLD_bsd/src/lib/geogram/basic/common.h 2025-01-10 12:46:26.973144862 -0500
@@ -216,6 +216,35 @@
# define GEO_ARCH_32
#endif
+// =============================== FreeBSD defines =========================
+
+#elif defined(__FreeBSD__)
+
+#define GEO_OS_FREEBSD
+#define GEO_OS_UNIX
+
+#if defined(_OPENMP)
+# define GEO_OPENMP
+#endif
+
+#if defined(__INTEL_COMPILER)
+# define GEO_COMPILER_INTEL
+#elif defined(__clang__)
+# define GEO_COMPILER_CLANG
+#elif defined(__GNUC__)
+# define GEO_COMPILER_GCC
+#else
+# error "Unsupported compiler"
+#endif
+
+// The following works on GCC and ICC
+#if defined(__x86_64)
+# define GEO_ARCH_64
+#else
+# define GEO_ARCH_32
+#endif
+
+
// =============================== WINDOWS defines =========================
#elif defined(_WIN32) || defined(_WIN64)
diff -Naur GEOGRAM_BLD/src/lib/geogram/lua/lua_io.cpp GEOGRAM_BLD_bsd/src/lib/geogram/lua/lua_io.cpp
--- GEOGRAM_BLD/src/lib/geogram/lua/lua_io.cpp 2025-01-10 12:45:04.497611199 -0500
+++ GEOGRAM_BLD_bsd/src/lib/geogram/lua/lua_io.cpp 2025-01-10 12:46:26.973144862 -0500
@@ -237,6 +237,8 @@
const char* result = "unknown";
#if defined(GEO_OS_LINUX)
result = "Linux";
+#elif defined(GEO_OS_FREEBSD)
+ result = "FreeBSD";
#elif defined(GEO_OS_APPLE)
result = "Apple";
#elif defined(GEO_OS_WINDOWS)
diff -Naur GEOGRAM_BLD/src/lib/geogram/NL/nl_private.h GEOGRAM_BLD_bsd/src/lib/geogram/NL/nl_private.h
--- GEOGRAM_BLD/src/lib/geogram/NL/nl_private.h 2025-01-10 12:45:04.501611127 -0500
+++ GEOGRAM_BLD_bsd/src/lib/geogram/NL/nl_private.h 2025-01-10 12:46:26.973144862 -0500
@@ -62,7 +62,7 @@
#define NL_OS_APPLE
#endif
-#if defined(__linux__) || defined(__ANDROID__) || defined(NL_OS_APPLE)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__ANDROID__) || defined(NL_OS_APPLE)
/**
* \brief Defined if compiled on a Unix-like platform.
*/
+279 -221
View File
@@ -1,7 +1,7 @@
diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
--- itcl/CMake/FindTCL.cmake 1969-12-31 19:00:00.000000000 -0500
+++ ITCL_BLD/CMake/FindTCL.cmake 2024-08-06 13:12:35.229286326 -0400
@@ -0,0 +1,496 @@
--- itcl/CMake/FindTCL.cmake 1969-12-31 19:00:00
+++ ITCL_BLD/CMake/FindTCL.cmake 2025-03-19 02:30:04
@@ -0,0 +1,554 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
@@ -38,7 +38,6 @@ diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
+
+#]=======================================================================]
+
+include(CMakeFindFrameworks)
+
+set(_TCL_SEARCHES)
+
@@ -52,8 +51,11 @@ diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
+ get_filename_component(
+ ActiveTcl_CurrentVersion
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
+ NAME)
+ set(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS}
+ NAME
+ )
+ set(
+ TCLTK_POSSIBLE_BIN_PATHS
+ ${TCLTK_POSSIBLE_BIN_PATHS}
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin"
@@ -61,13 +63,16 @@ diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/bin"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin"
+ )
+ )
+
+ get_filename_component(
+ ActiveTcl_CurrentVersion
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
+ NAME)
+ set(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ NAME
+ )
+ set(
+ TCLTK_POSSIBLE_LIB_PATHS
+ ${TCLTK_POSSIBLE_LIB_PATHS}
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib"
@@ -78,9 +83,11 @@ diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
+ "$ENV{ProgramFiles}/Tcl/Lib"
+ "C:/Program Files/Tcl/lib"
+ "C:/Tcl/lib"
+ )
+ )
+
+ set(TCLTK_POSSIBLE_INCLUDE_PATHS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+ set(
+ TCLTK_POSSIBLE_INCLUDE_PATHS
+ ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/include"
@@ -91,20 +98,30 @@ diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
+ "$ENV{ProgramFiles}/Tcl/include"
+ "C:/Program Files/Tcl/include"
+ "C:/Tcl/include"
+ )
+ )
+endif()
+
+set(TCL_TCLSH_NAMES
+set(
+ TCL_TCLSH_NAMES
+ tclsh
+ tclsh${TCL_LIBRARY_VERSION} tclsh${TK_LIBRARY_VERSION} tclsh${TK_WISH_VERSION}
+ tclsh87 tclsh8.7
+ tclsh86 tclsh8.6
+ tclsh85 tclsh8.5
+ tclsh84 tclsh8.4
+ tclsh83 tclsh8.3
+ tclsh82 tclsh8.2
+ tclsh80 tclsh8.0
+ )
+ tclsh${TCL_LIBRARY_VERSION}
+ tclsh${TK_LIBRARY_VERSION}
+ tclsh${TK_WISH_VERSION}
+ tclsh87
+ tclsh8.7
+ tclsh86
+ tclsh8.6
+ tclsh85
+ tclsh8.5
+ tclsh84
+ tclsh8.4
+ tclsh83
+ tclsh8.3
+ tclsh82
+ tclsh8.2
+ tclsh80
+ tclsh8.0
+)
+if(CYGWIN)
+ set(TCL_TCLSH_NAMES ${TCL_TCLSH_NAMES} cygtclsh83 cygtclsh80)
+endif(CYGWIN)
@@ -112,257 +129,298 @@ diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
+foreach(search ${_TCL_SEARCHES})
+ find_program(TCL_TCLSH NAMES ${TCL_TCLSH_NAMES} ${${search}} PATH_SUFFIXES bin)
+endforeach()
+if (NOT TCL_TCLSH)
+if(NOT TCL_TCLSH)
+ find_program(TCL_TCLSH NAMES ${TCL_TCLSH_NAMES} HINTS ${TCLTK_POSSIBLE_BIN_PATHS})
+endif (NOT TCL_TCLSH)
+endif(NOT TCL_TCLSH)
+
+if (TCL_ENABLE_TK)
+ set(TK_WISH_NAMES
+if(TCL_ENABLE_TK)
+ set(
+ TK_WISH_NAMES
+ wish
+ wish${TCL_LIBRARY_VERSION} wish${TK_LIBRARY_VERSION} wish${TCL_TCLSH_VERSION}
+ wish86 wish8.6
+ wish85 wish8.5
+ wish84 wish8.4
+ wish83 wish8.3
+ wish82 wish8.2
+ wish80 wish8.0
+ )
+ wish${TCL_LIBRARY_VERSION}
+ wish${TK_LIBRARY_VERSION}
+ wish${TCL_TCLSH_VERSION}
+ wish86
+ wish8.6
+ wish85
+ wish8.5
+ wish84
+ wish8.4
+ wish83
+ wish8.3
+ wish82
+ wish8.2
+ wish80
+ wish8.0
+ )
+
+ if(CYGWIN)
+ set(TK_WISH_NAMES ${TK_WISH_NAMES} cygwish80 )
+ set(TK_WISH_NAMES ${TK_WISH_NAMES} cygwish80)
+ endif()
+
+ foreach(search ${_TCL_SEARCHES})
+ find_program(TK_WISH NAMES ${TK_WISH_NAMES} ${${search}} PATH_SUFFIXES bin)
+ endforeach()
+ if (NOT TK_WISH)
+ find_program(TK_WISH NAMES ${TK_WISH_NAMES} HINTS ${TCLTK_POSSIBLE_BIN_PATHS})
+ endif (NOT TK_WISH)
+endif (TCL_ENABLE_TK)
+ if(NOT TK_WISH)
+ find_program(TK_WISH NAMES ${TK_WISH_NAMES} HINTS ${TCLTK_POSSIBLE_BIN_PATHS})
+ endif(NOT TK_WISH)
+endif(TCL_ENABLE_TK)
+
+if(TCLSH_VERSION_STRING)
+ set(TCL_TCLSH_VERSION "${TCLSH_VERSION_STRING}")
+else()
+ get_filename_component(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH)
+ get_filename_component(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH)
+ string(REGEX REPLACE
+ "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}")
+ string(REGEX REPLACE "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}")
+endif()
+
+set(TCLTK_POSSIBLE_LIB_PATHS
+ "${TCL_INCLUDE_PATH_PARENT}/lib"
+ "${TCL_LIBRARY_PATH}"
+ "${TCL_TCLSH_PATH_PARENT}/lib"
+ )
+if (TCL_ENABLE_TK)
+ set(TCLTK_POSSIBLE_LIB_PATHS
+set(TCLTK_POSSIBLE_LIB_PATHS "${TCL_INCLUDE_PATH_PARENT}/lib" "${TCL_LIBRARY_PATH}" "${TCL_TCLSH_PATH_PARENT}/lib")
+if(TCL_ENABLE_TK)
+ set(
+ TCLTK_POSSIBLE_LIB_PATHS
+ ${TCLTK_POSSIBLE_LIB_PATHS}
+ "${TK_INCLUDE_PATH_PARENT}/lib"
+ "${TK_LIBRARY_PATH}"
+ "${TK_WISH_PATH_PARENT}/lib"
+ )
+endif (TCL_ENABLE_TK)
+ )
+endif(TCL_ENABLE_TK)
+
+set(TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
+set(
+ TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
+ lib
+ lib/tcl
+ lib/tcl/tcl8.7
+ lib/tcl/tcl8.6
+ lib/tcl/tcl8.5
+ lib/tcl/tcl8.4
+ )
+if (TCL_ENABLE_TK)
+ set(TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
+)
+if(TCL_ENABLE_TK)
+ set(
+ TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
+ ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ lib/tcl/tk8.7
+ lib/tcl/tk8.6
+ lib/tcl/tk8.5
+ lib/tcl/tk8.4
+ )
+endif (TCL_ENABLE_TK)
+
+set(TCL_POSSIBLE_LIB_NAMES
+ tcl
+ tcl${TCL_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION}
+ tcl87 tcl8.7 tcl87t tcl8.7t
+ tcl86 tcl8.6 tcl86t tcl8.6t
+ tcl85 tcl8.5
+ tcl84 tcl8.4
+ tcl83 tcl8.3
+ tcl82 tcl8.2
+ tcl80 tcl8.0
+ )
+endif(TCL_ENABLE_TK)
+
+set(
+ TCL_POSSIBLE_LIB_NAMES
+ tcl
+ tcl${TCL_LIBRARY_VERSION}
+ tcl${TCL_TCLSH_VERSION}
+ tcl${TK_WISH_VERSION}
+ tcl87
+ tcl8.7
+ tcl87t
+ tcl8.7t
+ tcl86
+ tcl8.6
+ tcl86t
+ tcl8.6t
+ tcl85
+ tcl8.5
+ tcl84
+ tcl8.4
+ tcl83
+ tcl8.3
+ tcl82
+ tcl8.2
+ tcl80
+ tcl8.0
+)
+
+if(NOT TCL_LIBRARY)
+ foreach(search ${_TCL_SEARCHES})
+ find_library(TCL_LIBRARY
+ find_library(
+ TCL_LIBRARY
+ NAMES ${TCL_POSSIBLE_LIB_NAMES}
+ NAMES_PER_DIR ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES})
+ NAMES_PER_DIR
+ ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ )
+ endforeach()
+endif()
+if(NOT TCL_LIBRARY)
+ find_library(TCL_LIBRARY
+ find_library(
+ TCL_LIBRARY
+ NAMES ${TCL_POSSIBLE_LIB_NAMES}
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ )
+ )
+endif(NOT TCL_LIBRARY)
+
+set(TCLSTUB_POSSIBLE_LIB_NAMES
+set(
+ TCLSTUB_POSSIBLE_LIB_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
+ )
+ 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
+)
+if(NOT TCL_STUB_LIBRARY)
+ foreach(search ${_TCL_SEARCHES})
+ find_library(TCL_STUB_LIBRARY
+ find_library(
+ TCL_STUB_LIBRARY
+ NAMES ${TCLSTUB_POSSIBLE_LIB_NAMES}
+ NAMES_PER_DIR ${${search}}
+ NAMES_PER_DIR
+ ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ )
+ )
+ endforeach()
+endif()
+if(NOT TCL_STUB_LIBRARY)
+ find_library(TCL_STUB_LIBRARY
+ NAMES ${TCLSTUB_POSSIBLE_LIB_NAMES}
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ )
+ find_library(TCL_STUB_LIBRARY NAMES ${TCLSTUB_POSSIBLE_LIB_NAMES} PATHS ${TCLTK_POSSIBLE_LIB_PATHS})
+endif()
+
+if (TCL_ENABLE_TK)
+ set(TK_POSSIBLE_LIB_NAMES
+if(TCL_ENABLE_TK)
+ set(
+ TK_POSSIBLE_LIB_NAMES
+ tk
+ tk${TK_LIBRARY_VERSION} tk${TCL_TCLSH_VERSION} tk${TK_WISH_VERSION}
+ tk87 tk8.7 tk87t tk8.7t
+ tk86 tk8.6 tk86t tk8.6t
+ tk85 tk8.5
+ tk84 tk8.4
+ tk83 tk8.3
+ tk82 tk8.2
+ tk80 tk8.0
+ )
+ tk${TK_LIBRARY_VERSION}
+ tk${TCL_TCLSH_VERSION}
+ tk${TK_WISH_VERSION}
+ tk87
+ tk8.7
+ tk87t
+ tk8.7t
+ tk86
+ tk8.6
+ tk86t
+ tk8.6t
+ tk85
+ tk8.5
+ tk84
+ tk8.4
+ tk83
+ tk8.3
+ tk82
+ tk8.2
+ tk80
+ tk8.0
+ )
+
+ if(NOT TK_LIBRARY)
+ foreach(search ${_TCL_SEARCHES})
+ find_library(TK_LIBRARY
+ NAMES ${TK_POSSIBLE_LIB_NAMES}
+ NAMES_PER_DIR ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ )
+ find_library(
+ TK_LIBRARY
+ NAMES ${TK_POSSIBLE_LIB_NAMES}
+ NAMES_PER_DIR
+ ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ )
+ endforeach()
+ endif()
+ if(NOT TK_LIBRARY)
+ find_library(TK_LIBRARY
+ find_library(
+ TK_LIBRARY
+ NAMES ${TK_POSSIBLE_LIB_NAMES}
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ )
+ )
+ endif(NOT TK_LIBRARY)
+
+ set(TK_STUB_POSSIBLE_LIB_NAMES
+ set(
+ TK_STUB_POSSIBLE_LIB_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
+ )
+ 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
+ )
+
+ if(NOT TK_STUB_LIBRARY)
+ foreach(search ${_TCL_SEARCHES})
+ find_library(TK_STUB_LIBRARY
+ NAMES ${TK_STUB_POSSIBLE_LIB_NAMES}
+ NAMES_PER_DIR ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ )
+ find_library(
+ TK_STUB_LIBRARY
+ NAMES ${TK_STUB_POSSIBLE_LIB_NAMES}
+ NAMES_PER_DIR
+ ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ )
+ endforeach()
+ endif()
+ if(NOT TK_STUB_LIBRARY)
+ find_library(TK_STUB_LIBRARY
+ NAMES ${TK_STUB_POSSIBLE_LIB_NAMES}
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ )
+ find_library(TK_STUB_LIBRARY NAMES ${TK_STUB_POSSIBLE_LIB_NAMES} PATHS ${TCLTK_POSSIBLE_LIB_PATHS})
+ endif()
+
+ set(TTK_STUB_POSSIBLE_LIB_NAMES
+ set(
+ TTK_STUB_POSSIBLE_LIB_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
+ )
+ ttkstub${TCL_LIBRARY_VERSION}
+ ttkstub${TCL_TCLSH_VERSION}
+ ttkstub${TK_WISH_VERSION}
+ ttkstub88
+ ttkstub8.8
+ ttkstub87
+ ttkstub8.7
+ ttkstub86
+ ttkstub8.6
+ ttkstub85
+ ttkstub8.5
+ )
+
+ if(NOT TTK_STUB_LIBRARY)
+ foreach(search ${_TCL_SEARCHES})
+ find_library(TTK_STUB_LIBRARY
+ NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES}
+ NAMES_PER_DIR ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ )
+ find_library(
+ TTK_STUB_LIBRARY
+ NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES}
+ NAMES_PER_DIR
+ ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
+ )
+ endforeach()
+ endif()
+ if(NOT TTK_STUB_LIBRARY)
+ find_library(TTK_STUB_LIBRARY
+ NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES}
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ )
+ find_library(TTK_STUB_LIBRARY NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES} PATHS ${TCLTK_POSSIBLE_LIB_PATHS})
+ endif()
+endif (TCL_ENABLE_TK)
+endif(TCL_ENABLE_TK)
+
+CMAKE_FIND_FRAMEWORKS(Tcl)
+if (TCL_ENABLE_TK)
+ CMAKE_FIND_FRAMEWORKS(Tk)
+endif (TCL_ENABLE_TK)
+
+set(TCL_FRAMEWORK_INCLUDES)
+if(Tcl_FRAMEWORKS)
+ if(NOT TCL_INCLUDE_PATH)
+ foreach(dir ${Tcl_FRAMEWORKS})
+ set(TCL_FRAMEWORK_INCLUDES ${TCL_FRAMEWORK_INCLUDES} ${dir}/Headers)
+ endforeach()
+ endif()
+endif()
+
+if (TCL_ENABLE_TK)
+ set(TK_FRAMEWORK_INCLUDES)
+ if(Tk_FRAMEWORKS)
+ if(NOT TK_INCLUDE_PATH)
+ foreach(dir ${Tk_FRAMEWORKS})
+ set(TK_FRAMEWORK_INCLUDES ${TK_FRAMEWORK_INCLUDES}
+ ${dir}/Headers ${dir}/PrivateHeaders)
+ endforeach()
+ endif()
+ endif()
+endif (TCL_ENABLE_TK)
+
+set(TCLTK_POSSIBLE_INCLUDE_PATHS
+set(
+ TCLTK_POSSIBLE_INCLUDE_PATHS
+ "${TCL_LIBRARY_PATH_PARENT}/include"
+ "${TCL_INCLUDE_PATH}"
+ ${TCL_FRAMEWORK_INCLUDES}
+ "${TCL_TCLSH_PATH_PARENT}/include"
+ )
+if (TCL_ENABLE_TK)
+ set(TCLTK_POSSIBLE_INCLUDE_PATHS
+)
+if(TCL_ENABLE_TK)
+ set(
+ TCLTK_POSSIBLE_INCLUDE_PATHS
+ ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+ "${TCL_LIBRARY_PATH_PARENT}/include"
+ "${TCL_INCLUDE_PATH}"
+ ${TCL_FRAMEWORK_INCLUDES}
+ "${TCL_TCLSH_PATH_PARENT}/include"
+ )
+endif (TCL_ENABLE_TK)
+ )
+endif(TCL_ENABLE_TK)
+
+set(TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
+set(
+ TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
+ include
+ include/tcl${TCL_LIBRARY_VERSION}
+ include/tcl8.7
@@ -372,73 +430,71 @@ diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
+ include/tcl8.3
+ include/tcl8.2
+ include/tcl8.0
+ )
+)
+
+if (TCL_ENABLE_TK)
+ set(TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
+if(TCL_ENABLE_TK)
+ set(
+ TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
+ ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
+ include/tcl${TK_LIBRARY_VERSION}
+ include/tk8.7
+ include/tk8.6
+ include/tk8.5
+ include/tk8.4
+ )
+endif (TCL_ENABLE_TK)
+
+ )
+endif(TCL_ENABLE_TK)
+
+foreach(search ${_TCL_SEARCHES})
+ find_path(TCL_INCLUDE_PATH
+ NAMES tcl.h ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
+ )
+ find_path(TCL_INCLUDE_PATH NAMES tcl.h ${${search}} PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES})
+endforeach()
+if (NOT TCL_INCLUDE_PATH)
+ find_path(TCL_INCLUDE_PATH
+if(NOT TCL_INCLUDE_PATH)
+ find_path(
+ TCL_INCLUDE_PATH
+ NAMES tcl.h
+ HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
+ )
+ )
+endif()
+
+if (TCL_ENABLE_TK)
+
+if(TCL_ENABLE_TK)
+ foreach(search ${_TCL_SEARCHES})
+ find_path(TK_INCLUDE_PATH
+ NAMES tk.h ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
+ )
+ find_path(TK_INCLUDE_PATH NAMES tk.h ${${search}} PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES})
+ endforeach()
+ if (NOT TK_INCLUDE_PATH)
+ find_path(TK_INCLUDE_PATH
+ if(NOT TK_INCLUDE_PATH)
+ find_path(
+ TK_INCLUDE_PATH
+ NAMES tk.h
+ HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
+ )
+ )
+ endif()
+
+ # IFF we have TCL_TK_SYSTEM_GRAPHICS set and have a system TK_WISH, check that the
+ # windowing system matches the specified type
+ if (NOT "${TCL_TK_SYSTEM_GRAPHICS}" STREQUAL "" AND TK_WISH AND NOT TARGET "${TK_WISH}")
+ set(tkwin_script "
+ if(NOT "${TCL_TK_SYSTEM_GRAPHICS}" STREQUAL "" AND TK_WISH AND NOT TARGET "${TK_WISH}")
+ set(
+ tkwin_script
+ "
+ set filename \"${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM\"
+ set fileId [open $filename \"w\"]
+ set windowingsystem [tk windowingsystem]
+ puts $fileId $windowingsystem
+ close $fileId
+ exit
+ ")
+ "
+ )
+ set(tkwin_scriptfile "${CMAKE_BINARY_DIR}/CMakeTmp/tk_windowingsystem.tcl")
+ set(WSYS "wm-NOTFOUND")
+ file(WRITE ${tkwin_scriptfile} ${tkwin_script})
+ execute_process(COMMAND ${TK_WISH} ${tkwin_scriptfile} OUTPUT_VARIABLE EXECOUTPUT)
+ if (EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM")
+ if(EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM")
+ file(READ "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM" readresultvar)
+ string(REGEX REPLACE "\n" "" WSYS "${readresultvar}")
+ endif (EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM")
+ endif(EXISTS "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM")
+
+ # If we have no information about the windowing system or it does not match
+ # a specified system, the find_package detection has failed
+ if (NOT "${WSYS}" STREQUAL "${TCL_TK_SYSTEM_GRAPHICS}")
+ if(NOT "${WSYS}" STREQUAL "${TCL_TK_SYSTEM_GRAPHICS}")
+ unset(TCL_LIBRARY CACHE)
+ unset(TCL_STUB_LIBRARY CACHE)
+ unset(TK_LIBRARY CACHE)
@@ -456,28 +512,31 @@ diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
+ unset(TCL_STUB_LIBRARY CACHE)
+ unset(TK_STUB_LIBRARY CACHE)
+ unset(TTK_STUB_LIBRARY CACHE)
+ endif (NOT "${WSYS}" STREQUAL "${TCL_TK_SYSTEM_GRAPHICS}")
+ endif (NOT "${TCL_TK_SYSTEM_GRAPHICS}" STREQUAL "" AND TK_WISH AND NOT TARGET "${TK_WISH}")
+endif (TCL_ENABLE_TK)
+ endif(NOT "${WSYS}" STREQUAL "${TCL_TK_SYSTEM_GRAPHICS}")
+ endif(NOT "${TCL_TK_SYSTEM_GRAPHICS}" STREQUAL "" AND TK_WISH AND NOT TARGET "${TK_WISH}")
+endif(TCL_ENABLE_TK)
+
+include(FindPackageHandleStandardArgs)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL
+find_package_handle_standard_args(
+ TCL
+ REQUIRED_VARS TCL_LIBRARY TCL_STUB_LIBRARY TCL_INCLUDE_PATH TCL_TCLSH
+ VERSION_VAR TCLSH_VERSION_STRING)
+ VERSION_VAR TCLSH_VERSION_STRING
+)
+
+if (TCL_ENABLE_TK)
+if(TCL_ENABLE_TK)
+ 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_STUB_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY TK_STUB_LIBRARY TK_INCLUDE_PATH)
+ set(TCLTK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
+ find_package_handle_standard_args(
+ TCLTK
+ 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_STUB_LIBRARY TK_INCLUDE_PATH TK_WISH)
+ set(TK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
+ find_package_handle_standard_args(TK REQUIRED_VARS TK_LIBRARY TK_STUB_LIBRARY TK_INCLUDE_PATH TK_WISH)
+ unset(FPHSA_NAME_MISMATCHED)
+endif (TCL_ENABLE_TK)
+endif(TCL_ENABLE_TK)
+
+mark_as_advanced(
+ TCL_INCLUDE_PATH
@@ -489,8 +548,7 @@ diff -Naur itcl/CMake/FindTCL.cmake ITCL_BLD/CMake/FindTCL.cmake
+ TK_STUB_LIBRARY
+ TK_WISH
+ TTK_STUB_LIBRARY
+ )
+
+)
+
+# Local Variables:
+# tab-width: 8
+562 -505
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,7 +1,7 @@
# Decide if we're using opencv
cad_enable(OPENCV "gtools")
bext_enable(OPENCV)
bext_enable(OpenCV)
# Decision made
+1 -1
View File
@@ -1,7 +1,7 @@
# Decide if we're using OpenMesh
cad_enable(OPENMESH "libged")
bext_enable(OPENMESH)
bext_enable(OpenMesh)
# Decision made
+1
View File
@@ -36,6 +36,7 @@ if (ENABLE_PNG)
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX=ON>
$<$<BOOL:${ZLIB_TARGET}>:-DZ_PREFIX_STR=${Z_PREFIX_STR}>
-DZLIB_ROOT=$<$<BOOL:${ZLIB_TARGET}>:${CMAKE_BUNDLE_INSTALL_PREFIX}>
$<$<BOOL:${ZLIB_TARGET}>:-DPNG_BUILD_ZLIB=OFF>
-DPNG_LIB_NAME=${PNG_LIB_NAME}
-DPNG_NO_DEBUG_POSTFIX=ON
-DPNG_PREFIX=brl_
+5 -5
View File
@@ -138,7 +138,7 @@ diff -Naur libpng/CMakeLists.txt PNG_BLD/CMakeLists.txt
if(POLICY CMP0074)
# Allow find_package() to use the ZLIB_ROOT variable, if available.
cmake_policy(SET CMP0074 NEW)
@@ -47,8 +50,10 @@
@@ -48,8 +51,10 @@
# Previously, we used to set CMAKE_DEBUG_POSTFIX globally. That variable should
# not be cached, however, because doing so would affect all projects processed
# after libpng, in unexpected and undesirable ways.
@@ -151,7 +151,7 @@ diff -Naur libpng/CMakeLists.txt PNG_BLD/CMakeLists.txt
# Allow the users to import their own extra configuration settings.
set(DFA_XTRA ""
@@ -97,6 +102,7 @@
@@ -98,6 +103,7 @@
option(PNG_BUILD_ZLIB "Custom zlib location, else find_package is used" OFF)
if(NOT PNG_BUILD_ZLIB)
find_package(ZLIB REQUIRED)
@@ -159,7 +159,7 @@ diff -Naur libpng/CMakeLists.txt PNG_BLD/CMakeLists.txt
elseif(POLICY CMP0074)
if("x${ZLIB_ROOT}" STREQUAL "x")
message(DEPRECATION
@@ -489,10 +495,9 @@
@@ -490,10 +496,9 @@
if(PNG_PREFIX)
set(PNGLIBCONF_H_EXTRA_DEPENDS
@@ -172,7 +172,7 @@ diff -Naur libpng/CMakeLists.txt PNG_BLD/CMakeLists.txt
endif()
generate_out(INPUT "${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.c"
@@ -676,15 +681,15 @@
@@ -677,15 +682,15 @@
# We are on a Unix or Unix-like toolchain like the GNU toolchain on Windows.
# Library file names are expected to have an implicit prefix such as "lib".
# Let CMake prepend and append its usual prefixes and suffixes by default.
@@ -192,7 +192,7 @@ diff -Naur libpng/CMakeLists.txt PNG_BLD/CMakeLists.txt
endif()
if(PNG_SHARED)
@@ -1067,16 +1072,16 @@
@@ -1068,16 +1073,16 @@
if(PNG_SHARED)
# Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
if(NOT WIN32 OR CYGWIN OR MINGW)
+16 -4
View File
@@ -18,10 +18,20 @@ set(TCL_MAJOR_VERSION 8)
set(TCL_MINOR_VERSION 6)
set(TCL_VERSION "${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}")
# FIXME: Build currently fails hard on MacOS if allowed to use system Tcl
# due to incompatibilities with Itcl and inconsistent flags, so we turn
# building on unless it was specifically turned off apriori.
if (APPLE)
if (NOT DEFINED ENABLE_TCL)
set(ENABLE_TCL ON)
endif (NOT DEFINED ENABLE_TCL)
endif (APPLE)
if (NOT ENABLE_TCL AND NOT DISABLE_TCL)
set(TCL_ENABLE_TK ON CACHE BOOL "enable tk")
set(CMAKE_FIND_FRAMEWORK NEVER)
find_package(TCL "${TCL_VERSION}")
if (NOT TCL_FOUND AND NOT DEFINED ENABLE_TCL)
@@ -56,6 +66,7 @@ if (ENABLE_TCL)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tcl_configure.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/tcl_configure.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tcl_build.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/tcl_build.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tcl_install.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/tcl_install.cmake @ONLY)
if (NOT MSVC)
@@ -97,6 +108,9 @@ if (ENABLE_TCL)
# prefix? Is https://stackoverflow.com/a/11041834 what we need? Also, do
# we need to patch makefile.vc to reference our zlib dll?
# wipe out any errant CC setting
set(CC)
ExternalProject_Add(TCL_BLD
URL "${CMAKE_CURRENT_SOURCE_DIR}/tcl"
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
@@ -105,7 +119,7 @@ if (ENABLE_TCL)
CONFIGURE_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/tcl_configure.cmake
BINARY_DIR ${TCL_SRC_DIR}/win
BUILD_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/tcl_build.cmake
INSTALL_COMMAND ${VCVARS_BAT} && nmake -f makefile.vc install INSTALLDIR=${CMAKE_BUNDLE_INSTALL_PREFIX} SUFX=
INSTALL_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/tcl_install.cmake
LOG_CONFIGURE ${EXT_BUILD_QUIET}
LOG_BUILD ${EXT_BUILD_QUIET}
LOG_INSTALL ${EXT_BUILD_QUIET}
@@ -170,5 +184,3 @@ mark_as_advanced(TCL_VERSION)
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+22 -10
View File
@@ -1,19 +1,32 @@
message("Tcl build begins\n")
set(BUILD_SCRIPT "${CMAKE_BINARY_DIR}/build_tcl.bat")
# need to combine vcvars+nmake into same script so environment is shared
file(WRITE "${BUILD_SCRIPT}"
"@echo off\n"
"set VSCMD_DEBUG=0\n"
"call \"@VCVARS_BAT@\"\n"
"cd /D \"@TCL_SRC_DIR@/win\"\n"
"echo In Batch CC=%CC% but setting empty\n"
"set CC=\n"
"nmake -f makefile.vc INSTALLDIR=@CMAKE_BUNDLE_INSTALL_PREFIX@ SUFX=\n"
"exit /b %ERRORLEVEL%\n"
)
execute_process(
COMMAND "@VCVARS_BAT@"
)
execute_process(
COMMAND nmake -f makefile.vc INSTALLDIR=@CMAKE_BUNDLE_INSTALL_PREFIX@ SUFX=
RESULT_VARIABLE TCL_RET
WORKING_DIRECTORY "@TCL_SRC_DIR@/win"
OUTPUT_VARIABLE MSG
ERROR_VARIABLE MSG
COMMAND cmd /c "${BUILD_SCRIPT}"
RESULT_VARIABLE TCL_RET
OUTPUT_VARIABLE CMD_OUT
ERROR_VARIABLE CMD_OUT
)
if (TCL_RET)
message(FATAL_ERROR "Tcl build failed: ${MSG}\n")
message(FATAL_ERROR "Tcl build failed:\n${CMD_OUT}\n")
endif (TCL_RET)
message("Tcl build succeeded: ${MSG}\n")
message("Tcl build succeeded:\n${CMD_OUT}\n")
# Local Variables:
# tab-width: 8
@@ -21,4 +34,3 @@ message("Tcl build succeeded: ${MSG}\n")
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+35
View File
@@ -0,0 +1,35 @@
set(INSTALL_SCRIPT "${CMAKE_BINARY_DIR}/install_tcl.bat")
# need to combine vcvars+nmake into same script so environment is shared
file(WRITE "${INSTALL_SCRIPT}"
"@echo off\n"
"set VSCMD_DEBUG=0\n"
"call \"@VCVARS_BAT@\"\n"
"cd /D \"@TCL_SRC_DIR@/win\"\n"
"echo In Batch CC=%CC% but setting empty\n"
"set CC=\n"
"nmake -f makefile.vc install INSTALLDIR=@CMAKE_BUNDLE_INSTALL_PREFIX@ SUFX=\n"
"exit /b %ERRORLEVEL%\n"
)
execute_process(
WORKING_DIRECTORY "@TCL_SRC_DIR@/win"
COMMAND cmd /c "${INSTALL_SCRIPT}"
RESULT_VARIABLE TCL_RET
OUTPUT_VARIABLE CMD_OUT
ERROR_VARIABLE CMD_OUT
)
if (TCL_RET)
message(FATAL_ERROR "Tcl install failed:\n${CMD_OUT}\n")
endif (TCL_RET)
message("Tcl install succeeded:\n${CMD_OUT}\n")
# Local Variables:
# tab-width: 8
# mode: cmake
# indent-tabs-mode: t
# End:
# ex: shiftwidth=2 tabstop=8
+12 -8
View File
@@ -1,7 +1,7 @@
diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
--- zlib/CMakeLists.txt 2024-03-14 20:07:06.811461199 -0400
+++ ZLIB_BLD/CMakeLists.txt 2024-03-14 20:02:42.716002504 -0400
@@ -3,6 +3,13 @@
--- zlib/CMakeLists.txt 2025-01-02 21:07:37.801523356 -0500
+++ ZLIB_BLD/CMakeLists.txt 2025-01-02 21:08:09.170946446 -0500
@@ -3,8 +3,17 @@
project(zlib C)
@@ -14,8 +14,12 @@ diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
+
set(VERSION "1.3.1")
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+
option(ZLIB_BUILD_EXAMPLES "Enable Zlib Examples" ON)
@@ -57,41 +64,38 @@
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
@@ -57,41 +66,38 @@
# Check for unistd.h
#
check_include_file(unistd.h Z_HAVE_UNISTD_H)
@@ -76,7 +80,7 @@ diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
)
set(ZLIB_PRIVATE_HDRS
crc32.h
@@ -122,14 +126,8 @@
@@ -122,14 +128,8 @@
zutil.c
)
@@ -92,7 +96,7 @@ diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
"\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
@@ -147,16 +145,35 @@
@@ -147,16 +147,35 @@
-o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
-i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
@@ -129,7 +133,7 @@ diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
# This property causes shared libraries on Linux to have the full version
# encoded into their final filename. We disable this on Cygwin because
# it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll
@@ -165,18 +182,12 @@
@@ -165,18 +184,12 @@
# This has no effect with MSVC, on that platform the version info for
# the DLL comes from the resource file win32/zlib1.rc
set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})
@@ -152,7 +156,7 @@ diff -Naur zlib/CMakeLists.txt ZLIB_BLD/CMakeLists.txt
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
install(TARGETS zlib zlibstatic
@@ -187,12 +198,7 @@
@@ -187,12 +200,7 @@
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION "${INSTALL_INC_DIR}")
endif()