Revision: 77398
http://sourceforge.net/p/brlcad/code/77398
Author: starseeker
Date: 2020-10-10 02:45:34 +0000 (Sat, 10 Oct 2020)
Log Message:
-----------
More 3rd party work. Moderately maddening - if I use the full path variable
setting the linking works but the dependencies don't trigger, but if I go the
other way and use the imported targets the libtcl.so linkage is wrong.
Modified Paths:
--------------
brlcad/branches/thirdparty_rework/CMakeLists.txt
brlcad/branches/thirdparty_rework/misc/CMake/RPath_Setup.cmake
brlcad/branches/thirdparty_rework/src/other/tkhtml/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/tcl.cmake
brlcad/branches/thirdparty_rework/src/superbuild/tk.cmake
Modified: brlcad/branches/thirdparty_rework/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/CMakeLists.txt 2020-10-09 20:39:24 UTC
(rev 77397)
+++ brlcad/branches/thirdparty_rework/CMakeLists.txt 2020-10-10 02:45:34 UTC
(rev 77398)
@@ -141,13 +141,31 @@
# identifying the necessity of setting CMAKE_INSTALL_NAME_DIR on OSX.
# Documentation of these options is available at
# http://www.cmake.org/Wiki/CMake_RPATH_handling
+if (NOT COMMAND std_build_rpath)
+ include(RPath_Setup)
+endif (NOT COMMAND std_build_rpath)
-# TODO - once we've shifted to function invocation rather than having
-# our logic execute on load, this "include" step will probably be
-# consolidated into one large include...
-include(RPath_Setup)
-cmake_set_rpath()
+# We want the full RPATH set in the build tree so we can run programs without
+# needing to set LD_LIBRARY_PATH
+set(CMAKE_SKIP_BUILD_RPATH FALSE)
+# We DON'T want the final install directory RPATH set in the build directory
+# - it should only be set to the installation value when actually installed.
+set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+
+# Add the automatically determined parts of the RPATH which point to
+# directories outside the build tree to the install RPATH
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+
+# Set RPATH value to use when installing. This should be set to always
+# prefer the version in the installed path when possible, but fall back on a
+# location relative to the loading file's path if the installed version is
+# not present. How to do so is platform specific.
+relative_rpath(RELPATH)
+set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}${RELPATH}")
+
+std_build_rpath()
+
#----------------------------------------------------------------------
# Some generators in CMake support generating folders in IDEs for
# organizing build targets. We want to use them if they are there.
Modified: brlcad/branches/thirdparty_rework/misc/CMake/RPath_Setup.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/misc/CMake/RPath_Setup.cmake
2020-10-09 20:39:24 UTC (rev 77397)
+++ brlcad/branches/thirdparty_rework/misc/CMake/RPath_Setup.cmake
2020-10-10 02:45:34 UTC (rev 77398)
@@ -29,10 +29,63 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+include(CMakeParseArguments)
+
+# Relative path specifiers are platform specific. Encapsulate them in a
+# function to hide the details from other code.
+function(relative_rpath outvar)
+
+ cmake_parse_arguments(R "" "SUFFIX;LEN" "" ${ARGN})
+
+ if (R_SUFFIX)
+ set(DPATH)
+ set(CPATH "${R_SUFFIX}")
+ while (NOT "${CPATH}" STREQUAL "")
+ set(DPATH "../${DPATH}")
+ get_filename_component(CPATH "${CPATH}" DIRECTORY)
+ endwhile()
+ else ()
+ set(DPATH "../")
+ endif (R_SUFFIX)
+
+ if (APPLE)
+ set(RELATIVE_RPATH ";@loader_path/${DPATH}${LIB_DIR}" PARENT_SCOPE)
+ else (APPLE)
+ set(RELATIVE_RPATH ":\$ORIGIN/${DPATH}${LIB_DIR}" PARENT_SCOPE)
+ endif (APPLE)
+
+ # IFF the caller tells us to, lengthen the relative path to a
+ # specified length. This is useful in scenarios where the relative
+ # path is the only viable option
+ if (R_LEN)
+ string(LENGTH "${RELATIVE_RPATH}" CURR_LEN)
+ while("${CURR_LEN}" LESS "${R_LEN}")
+ set(RELATIVE_RPATH "${RELATIVE_RPATH}:")
+ string(LENGTH "${RELATIVE_RPATH}" CURR_LEN)
+ endwhile("${CURR_LEN}" LESS "${R_LEN}")
+ endif (R_LEN)
+
+ set(${outvar} "${RELATIVE_RPATH}" PARENT_SCOPE)
+
+endfunction(relative_rpath)
+
+# Set (or restore) a standard BRL-CAD setting for CMAKE_BUILD_RPATH.
+function(std_build_rpath)
+ # If we're in multiconfig mode, we need to look relative to the current
+ # build configuration, not the top level lib directory.
+ if (CMAKE_CONFIGURATION_TYPES)
+ set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/$<CONFIG>/${LIB_DIR}")
+ else (CMAKE_CONFIGURATION_TYPES)
+ set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/${LIB_DIR}")
+ endif (CMAKE_CONFIGURATION_TYPES)
+
+ # Done - let the parent know what the answers are
+ set(CMAKE_BUILD_RPATH "${CMAKE_BUILD_RPATH}" PARENT_SCOPE)
+endfunction(std_build_rpath)
+
#---------------------------------------------------------------------
-# The following logic is what allows binaries to run successfully in
-# the build directory AND install directory.
-# http://www.cmake.org/Wiki/CMake_RPATH_handling
+# Settings for CMAKE_RPATH_BUILD that support custom manipulation of
+# external project outputs.
# TODO - investigate using BUILD_RPATH and INSTALL_RPATH on a per
# target basis for more precise control (for example, when setting
@@ -43,104 +96,122 @@
# in case that's of use to pull other properties on which to base
# rpaths...
+# Can use set_property: https://stackoverflow.com/a/40147991
-include(CMakeParseArguments)
+# To allow CMake to manipulate RPaths, we need to make sure they are all the
+# same length and long enough to hold the longest candidate path we will need.
+#
+# NOTE: Since we haven't yet created any lib subdirectories that may be created
+# by 3rd party builds, we can't check them for explicit length - for now, we
+# use 20 as an upper bound on how long a directory name we might need there,
+# but that will need to be updated in the event a more verbosely named library
+# subdirectory shows up.
+function(longest_rpath outvar)
-# For a given path, calculate the $ORIGIN style path needed relative
-# to CMAKE_INSTALL_PREFIX
-function(ORIGIN_REL_PATH POPATH INIT_PATH)
+ cmake_parse_arguments(R "" "SUFFIX" "" ${ARGN})
- get_filename_component(CPATH "${INIT_PATH}" REALPATH)
- set(RELDIRS)
- set(FPATH)
- while (NOT "${CPATH}" STREQUAL "${CMAKE_INSTALL_PREFIX}")
- get_filename_component(CDIR "${CPATH}" NAME)
- get_filename_component(CPATH "${CPATH}" DIRECTORY)
- if (NOT "${RELDIRS}" STREQUAL "")
- set(RELDIRS "${CDIR}/${RELDIRS}")
- set(FPATH "../${FPATH}")
- else (NOT "${RELDIRS}" STREQUAL "")
- set(RELDIRS "${CDIR}")
- set(FPATH "../")
- endif (NOT "${RELDIRS}" STREQUAL "")
- endwhile()
+ # Microsoft platforms don't do RPATH
+ if (MSVC)
+ return()
+ endif (MSVC)
- set(FPATH "${FPATH}${RELDIRS}")
+ # The possible roots are CMAKE_INSTALL_PREFIX and CMAKE_BINARY_DIR.
+ # Find out which is longer
+ string(LENGTH "${CMAKE_INSTALL_PREFIX}" ILEN)
+ string(LENGTH "${CMAKE_BINARY_DIR}" BLEN)
+ if ("${ILEN}" GREATER "${BLEN}")
+ set(ROOT_LEN "${ILEN}")
+ else ("${ILEN}" GREATER "${BLEN}")
+ set(ROOT_LEN "${BLEN}")
+ endif ("${ILEN}" GREATER "${BLEN}")
- set(${POPATH} ${FPATH} PARENT_SCOPE)
-endfunction()
+ # Find the longest of the configuration string names
+ # (this will be zero in a non-multiconfig build)
+ set(CONF_LEN 0)
+ foreach(cfg ${CMAKE_CONFIGURATION_TYPES})
+ string(LENGTH "/${cfg}" CLEN)
+ if ("${CLEN}" GREATER "${CONF_LEN}")
+ set(CONF_LEN ${CLEN})
+ endif ("${CLEN}" GREATER "${CONF_LEN}")
+ endforeach(cfg ${CMAKE_CONFIGURATION_TYPES})
+ # The length of LIB_DIR itself needs to be factored in
+ if (R_SUFFIX)
+ string(LENGTH "/${LIB_DIR}/${R_SUFFIX}" LIB_LEN)
+ else (R_SUFFIX)
+ string(LENGTH "/${LIB_DIR}" LIB_LEN)
+ endif (R_SUFFIX)
-if(NOT COMMAND cmake_set_rpath)
+ # Hardcoded estimate of maximum lib subdir length
+ #
+ # *** UPDATE THIS IF UNABLE TO SET RPATH FOR LIBRARIES IN SUBDIRS ***
+ #
+ set(SUBLIB_LEN 20)
- function(cmake_set_rpath)
+ # Include the relative path specifier length:
+ if (R_SUFFIX)
+ relative_rpath(RELPATH SUFFIX "${R_SUFFIX}")
+ else (R_SUFFIX)
+ relative_rpath(RELPATH)
+ endif (R_SUFFIX)
+ string(LENGTH "${RELPATH}" REL_LEN)
- # See if we have a suffix for the paths
- cmake_parse_arguments(R "" "SUFFIX" "" ${ARGN})
+ math(EXPR len "${ROOT_LEN} + ${CONF_LEN} + ${LIB_LEN} + ${SUBLIB_LEN} +
${REL_LEN}")
- # We want the full RPATH set in the build tree so we can run programs
without
- # needing to set LD_LIBRARY_PATH
- set(CMAKE_SKIP_BUILD_RPATH FALSE PARENT_SCOPE)
+ set(${outvar} ${len} PARENT_SCOPE)
- # We DON'T want the final install directory RPATH set in the build
directory
- # - it should only be set to the installation value when actually
installed.
- set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE PARENT_SCOPE)
+endfunction(longest_rpath)
- # Add the automatically determined parts of the RPATH which point to
- # directories outside the build tree to the install RPATH
- set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE PARENT_SCOPE)
- # Set an initial RPATH to use for length calculations
- if(NOT R_SUFFIX)
- set(LSUFFIX "${LIB_DIR}")
- else(NOT R_SUFFIX)
- set(LSUFFIX "${LIB_DIR}/${R_SUFFIX}")
- endif(NOT R_SUFFIX)
+function(ext_build_rpath)
- # Calculate how many ../ offsets are needed to return from this directory
- # to the install origin
- set(OPATH)
- ORIGIN_REL_PATH(OPATH "${CMAKE_INSTALL_PREFIX}/${LSUFFIX}")
+ # Microsoft platforms don't do RPATH
+ if (MSVC)
+ return()
+ endif (MSVC)
- # Set RPATH value to use when installing. This should be set to always
- # prefer the version in the installed path when possible, but fall back on
a
- # location relative to the loading file's path if the installed version is
- # not present. How to do so is platform specific.
- if(NOT APPLE)
- set(CMAKE_INSTALL_RPATH
"${CMAKE_INSTALL_PREFIX}/${LSUFFIX}:\$ORIGIN/${OPATH}")
- else(NOT APPLE)
- set(CMAKE_INSTALL_RPATH
"${CMAKE_INSTALL_PREFIX}/${LSUFFIX};@loader_path/${OPATH}")
- endif(NOT APPLE)
+ cmake_parse_arguments(R "" "SUFFIX" "" ${ARGN})
- # Determine what the build time RPATH will be that is used to support
- # CMake's RPATH manipulation, so it can be used in external projects.
+ if (R_SUFFIX)
+ longest_rpath(LLEN SUFFIX "${R_SUFFIX}")
+ else (R_SUFFIX)
+ longest_rpath(LLEN)
+ endif (R_SUFFIX)
- # TODO - need to check behavior when the BUILD_RPATH is longer than the
INSTALL_RPATH -
- # it should work, but the install rpath won't overwrite the extra chars
with : as is - we
- # may need to do that to make sure only the correct paths are present
- set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/${LSUFFIX}")
- string(LENGTH "${CMAKE_INSTALL_RPATH}" INSTALL_LEN)
- string(LENGTH "${CMAKE_BUILD_RPATH}" CURR_LEN)
- while("${CURR_LEN}" LESS "${INSTALL_LEN}")
- # This is the key to the process - the ":" characters appended to the
- # build time path result in a path string in the compile outputs that
- # has sufficient length to hold the install directory, while is what
- # allows CMake's file command to manipulate the paths. At the same time,
- # the colon lengthened paths do not break the functioning of the shorter
- # build path. Normally this is an internal CMake detail, but we need it
- # to supply to external build systems so their outputs can be manipulated
- # as if they were outputs of our own build.
- set(CMAKE_BUILD_RPATH "${CMAKE_BUILD_RPATH}:")
- string(LENGTH "${CMAKE_BUILD_RPATH}" CURR_LEN)
- endwhile("${CURR_LEN}" LESS "${INSTALL_LEN}")
+ # If we're in multiconfig mode, we want to target the config subdir, not just
+ # the build dir itself.
+ if (CMAKE_CONFIGURATION_TYPES)
+ if (R_SUFFIX)
+ set(BUILD_RPATH "${CMAKE_BINARY_DIR}/$<CONFIG>/${LIB_DIR}/${R_SUFFIX}")
+ else (R_SUFFIX)
+ set(BUILD_RPATH "${CMAKE_BINARY_DIR}/$<CONFIG>/${LIB_DIR}")
+ endif (R_SUFFIX)
+ else (CMAKE_CONFIGURATION_TYPES)
+ if (R_SUFFIX)
+ set(BUILD_RPATH "${CMAKE_BINARY_DIR}/${LIB_DIR}/${R_SUFFIX}")
+ else (R_SUFFIX)
+ set(BUILD_RPATH "${CMAKE_BINARY_DIR}/${LIB_DIR}")
+ endif (R_SUFFIX)
+ endif (CMAKE_CONFIGURATION_TYPES)
- # Done - let the parent know what the answers are
- set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}" PARENT_SCOPE)
- set(CMAKE_BUILD_RPATH "${CMAKE_BUILD_RPATH}" PARENT_SCOPE)
+ # This is the key to the process - the ":" characters appended to the build
+ # time path result in a path string in the compile outputs that has
+ # sufficient length to hold the install directory, while is what allows
+ # CMake's file command to manipulate the paths. At the same time, the colon
+ # lengthened paths do not break the functioning of the shorter build path.
+ # Normally this is an internal CMake detail, but we need it to supply to
+ # external build systems so their outputs can be manipulated as if they were
+ # outputs of our own build.
+ string(LENGTH "${BUILD_RPATH}" CURR_LEN)
+ while("${CURR_LEN}" LESS "${LLEN}")
+ set(BUILD_RPATH "${BUILD_RPATH}:")
+ string(LENGTH "${BUILD_RPATH}" CURR_LEN)
+ endwhile("${CURR_LEN}" LESS "${LLEN}")
- endfunction(cmake_set_rpath)
+ # Done - let the parent know what the answers are
+ set(CMAKE_BUILD_RPATH "${BUILD_RPATH}" PARENT_SCOPE)
-endif(NOT COMMAND cmake_set_rpath)
+endfunction(ext_build_rpath)
# Local Variables:
# tab-width: 8
Modified: brlcad/branches/thirdparty_rework/src/other/tkhtml/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/other/tkhtml/CMakeLists.txt
2020-10-09 20:39:24 UTC (rev 77397)
+++ brlcad/branches/thirdparty_rework/src/other/tkhtml/CMakeLists.txt
2020-10-10 02:45:34 UTC (rev 77398)
@@ -1,11 +1,3 @@
-# Minimum required version of CMake
-cmake_minimum_required(VERSION 3.12)
-
-# set CMake project name
-project(TKHTML)
-
-find_package(TCL)
-
if (TK_SYSTEM_GRAPHICS MATCHES "x11")
find_package(X11)
endif (TK_SYSTEM_GRAPHICS MATCHES "x11")
@@ -74,13 +66,6 @@
src/swproc.c
)
-if (NOT LIB_DIR)
- if (NOT WIN32)
- set(LIB_DIR lib)
- else (NOT WIN32)
- set(LIB_DIR bin)
- endif (NOT WIN32)
-endif (NOT LIB_DIR)
add_library(Tkhtml SHARED ${TKHTML_SRCS})
if (TK_SYSTEM_GRAPHICS MATCHES "aqua")
Modified: brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt
2020-10-09 20:39:24 UTC (rev 77397)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt
2020-10-10 02:45:34 UTC (rev 77398)
@@ -73,7 +73,9 @@
# for relocatable binary packages on Linux and similar platforms.
# BRL-CAD's needs are rather complex when it comes to RPath, so we
# define a series of functions:
-include(RPath_Setup)
+if (NOT COMMAND std_build_rpath)
+ include(RPath_Setup)
+endif (NOT COMMAND std_build_rpath)
# We want the full RPATH set in the build tree so we can run programs without
# needing to set LD_LIBRARY_PATH
@@ -235,6 +237,10 @@
include(${CMAKE_CURRENT_SOURCE_DIR}/iwidgets.cmake)
set(BUILD_STATIC_LIBS ${BSL_CACHE})
+
+std_build_rpath()
+message("CMAKE_BUILD_RPATH: ${CMAKE_BUILD_RPATH}")
+
# Local Variables:
# tab-width: 8
# mode: cmake
Modified: brlcad/branches/thirdparty_rework/src/superbuild/tcl.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/tcl.cmake 2020-10-09
20:39:24 UTC (rev 77397)
+++ brlcad/branches/thirdparty_rework/src/superbuild/tcl.cmake 2020-10-10
02:45:34 UTC (rev 77398)
@@ -80,7 +80,7 @@
)
ExternalProject_Target(tclsh_exe TCL_BLD ${TCL_INSTDIR}
- EXEC
${BIN_DIR}/tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${CMAKE_EXECUTABLE_SUFFIX}
+ EXEC ${BIN_DIR}/tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${EXE_EXT}
RPATH
)
ExternalProject_ByProducts(tcl TCL_BLD ${TCL_INSTDIR} ${LIB_DIR} ${LIB_DIR}
@@ -310,6 +310,11 @@
tm.tcl
word.tcl
)
+
+ ExternalProject_ByProducts(tcl TCL_BLD ${TCL_INSTDIR} ${LIB_DIR}/tcl8/8.5
${LIB_DIR}/tcl8/8.5
+ msgcat-1.6.1.tm
+ )
+
ExternalProject_ByProducts(tcl TCL_BLD ${TCL_INSTDIR} ${INCLUDE_DIR}
${INCLUDE_DIR}
tclDecls.h
tcl.h
@@ -320,7 +325,6 @@
tclTomMath.h
)
-
set(TCL_LIBRARY tcl CACHE STRING "Building bundled tcl" FORCE)
set(TCL_LIBRARIES tcl CACHE STRING "Building bundled tcl" FORCE)
set(TCL_STUB_LIBRARY tclstub CACHE STRING "Building bundled tcl" FORCE)
@@ -328,6 +332,23 @@
set(TCL_INCLUDE_PATH "${CMAKE_BINARY_DIR}/$<CONFIG>/${INCLUDE_DIR}" CACHE
STRING "Directory containing tcl headers." FORCE)
set(TCL_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/$<CONFIG>/${INCLUDE_DIR}" CACHE
STRING "Directory containing tcl headers." FORCE)
+
+ #if (CMAKE_CONFIGURATION_TYPES)
+ # set(TCL_LIBRARY
"${CMAKE_BINARY_DIR}/$<CONFIG>/${LIB_DIR}/${TCL_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TCL_LIBRARIES ${TCL_LIBRARY} CACHE STRING "Building bundled tcl" FORCE)
+ # set(TCL_STUB_LIBRARY
"${CMAKE_BINARY_DIR}/$<CONFIG>/${LIB_DIR}/${TCL_STUBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TCL_TCLSH
"${CMAKE_BINARY_DIR}/$<CONFIG>/${BIN_DIR}/tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${EXE_EXT}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TCL_INCLUDE_PATH "${CMAKE_BINARY_DIR}/$<CONFIG>/${INCLUDE_DIR}" CACHE
STRING "Directory containing tcl headers." FORCE)
+ # set(TCL_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/$<CONFIG>/${INCLUDE_DIR}" CACHE
STRING "Directory containing tcl headers." FORCE)
+ #else (CMAKE_CONFIGURATION_TYPES)
+ # set(TCL_LIBRARY
"${CMAKE_BINARY_DIR}/${LIB_DIR}/${TCL_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TCL_LIBRARIES ${TCL_LIBRARY} CACHE STRING "Building bundled tcl" FORCE)
+ # set(TCL_STUB_LIBRARY
"${CMAKE_BINARY_DIR}/${LIB_DIR}/${TCL_STUBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TCL_TCLSH
"${CMAKE_BINARY_DIR}/${BIN_DIR}/tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${EXE_EXT}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TCL_INCLUDE_PATH "${CMAKE_BINARY_DIR}/${INCLUDE_DIR}" CACHE STRING
"Directory containing tcl headers." FORCE)
+ # set(TCL_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/${INCLUDE_DIR}" CACHE STRING
"Directory containing tcl headers." FORCE)
+ #endif (CMAKE_CONFIGURATION_TYPES)
+
SetTargetFolder(TCL_BLD "Third Party Libraries")
SetTargetFolder(tcl "Third Party Libraries")
Modified: brlcad/branches/thirdparty_rework/src/superbuild/tk.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/tk.cmake 2020-10-09
20:39:24 UTC (rev 77397)
+++ brlcad/branches/thirdparty_rework/src/superbuild/tk.cmake 2020-10-10
02:45:34 UTC (rev 77398)
@@ -33,7 +33,7 @@
set(TK_BASENAME libtk${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
set(TK_STUBNAME libtkstub${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
- set(TTK_STUBNAME libttkstub${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
+ #set(TTK_STUBNAME libttkstub${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
set(TK_PATCH_FILES "${TK_SRC_DIR}/unix/configure"
"${TK_SRC_DIR}/macosx/configure" "${TK_SRC_DIR}/unix/tcl.m4")
@@ -51,7 +51,7 @@
set(TK_BASENAME tk${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
set(TK_STUBNAME tkstub${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
- set(TTK_STUBNAME ttkstub${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
+ #set(TTK_STUBNAME ttkstub${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION})
ExternalProject_Add(TK_BLD
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tk"
@@ -73,9 +73,9 @@
ExternalProject_Target(tkstub TK_BLD ${TK_INSTDIR}
STATIC ${LIB_DIR}/${TK_STUBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
)
- ExternalProject_Target(ttkstub TK_BLD ${TK_INSTDIR}
- STATIC ${LIB_DIR}/${TTK_STUBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
- )
+ #ExternalProject_Target(ttkstub TK_BLD ${TK_INSTDIR}
+ # STATIC ${LIB_DIR}/${TTK_STUBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
+ # )
ExternalProject_Target(wish_exe TK_BLD ${TK_INSTDIR}
EXEC
${BIN_DIR}/wish${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${CMAKE_EXECUTABLE_SUFFIX}
RPATH
@@ -194,11 +194,29 @@
set(TK_LIBRARY tk CACHE STRING "Building bundled tk" FORCE)
set(TK_LIBRARIES tk CACHE STRING "Building bundled tk" FORCE)
set(TK_STUB_LIBRARY tkstub CACHE STRING "Building bundled tk" FORCE)
- set(TTK_STUB_LIBRARY ttkstub CACHE STRING "Building bundled tk" FORCE)
+ #set(TTK_STUB_LIBRARY ttkstub CACHE STRING "Building bundled tk" FORCE)
set(TK_WISH wish_exe CACHE STRING "Building bundled tk" FORCE)
set(TK_INCLUDE_PATH "${CMAKE_BINARY_DIR}/$<CONFIG>/${INCLUDE_DIR}" CACHE
STRING "Directory containing tcl headers." FORCE)
set(TK_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/$<CONFIG>/${INCLUDE_DIR}" CACHE
STRING "Directory containing tcl headers." FORCE)
+ #if (CMAKE_CONFIGURATION_TYPES)
+ # set(TK_LIBRARY
"${CMAKE_BINARY_DIR}/$<CONFIG>/${LIB_DIR}/${TK_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TK_LIBRARIES ${TK_LIBRARY} CACHE STRING "Building bundled tcl" FORCE)
+ # set(TK_STUB_LIBRARY
"${CMAKE_BINARY_DIR}/$<CONFIG>/${LIB_DIR}/${TK_STUBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TTK_STUB_LIBRARY
"${CMAKE_BINARY_DIR}/$<CONFIG>/${LIB_DIR}/${TTK_STUBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TK_WISH
"${CMAKE_BINARY_DIR}/$<CONFIG>/${BIN_DIR}/wish${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${EXE_EXT}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TK_INCLUDE_PATH "${CMAKE_BINARY_DIR}/$<CONFIG>/${INCLUDE_DIR}" CACHE
STRING "Directory containing tcl headers." FORCE)
+ # set(TK_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/$<CONFIG>/${INCLUDE_DIR}" CACHE
STRING "Directory containing tcl headers." FORCE)
+ #else (CMAKE_CONFIGURATION_TYPES)
+ # set(TK_LIBRARY
"${CMAKE_BINARY_DIR}/${LIB_DIR}/${TK_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TK_LIBRARIES ${TK_LIBRARY} CACHE STRING "Building bundled tcl" FORCE)
+ # set(TK_STUB_LIBRARY
"${CMAKE_BINARY_DIR}/${LIB_DIR}/${TK_STUBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TTK_STUB_LIBRARY
"${CMAKE_BINARY_DIR}/${LIB_DIR}/${TTK_STUBNAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TK_WISH
"${CMAKE_BINARY_DIR}/${BIN_DIR}/wish${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${EXE_EXT}"
CACHE STRING "Building bundled tcl" FORCE)
+ # set(TK_INCLUDE_PATH "${CMAKE_BINARY_DIR}/${INCLUDE_DIR}" CACHE STRING
"Directory containing tcl headers." FORCE)
+ # set(TK_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/${INCLUDE_DIR}" CACHE STRING
"Directory containing tcl headers." FORCE)
+ #endif (CMAKE_CONFIGURATION_TYPES)
+
SetTargetFolder(TK_BLD "Third Party Libraries")
SetTargetFolder(tk "Third Party Libraries")
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits