Revision: 77276
          http://sourceforge.net/p/brlcad/code/77276
Author:   starseeker
Date:     2020-09-29 18:47:02 +0000 (Tue, 29 Sep 2020)
Log Message:
-----------
Get as far as starting to do a BRL-CAD build (with system libs).

Modified Paths:
--------------
    brlcad/branches/thirdparty_rework/src/external/Unigraphics/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/other/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/other/tkhtml/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/other/tkhtml/TCL_PKGINDEX.cmake
    brlcad/branches/thirdparty_rework/src/other/tktable/CMakeLists.txt
    brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt

Added Paths:
-----------
    brlcad/branches/thirdparty_rework/misc/CMake/FindGDIAM.cmake
    brlcad/branches/thirdparty_rework/misc/CMake/FindPOLY2TRI.cmake
    brlcad/branches/thirdparty_rework/misc/CMake/FindPROJ4.cmake
    brlcad/branches/thirdparty_rework/misc/CMake/FindSPSR.cmake
    brlcad/branches/thirdparty_rework/misc/CMake/FindSTEPCODE.cmake
    brlcad/branches/thirdparty_rework/src/other/tktable/TCL_PKGINDEX.cmake
    brlcad/branches/thirdparty_rework/src/superbuild/tkhtml.cmake
    brlcad/branches/thirdparty_rework/src/superbuild/tktable.cmake

Added: brlcad/branches/thirdparty_rework/misc/CMake/FindGDIAM.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/misc/CMake/FindGDIAM.cmake                
                (rev 0)
+++ brlcad/branches/thirdparty_rework/misc/CMake/FindGDIAM.cmake        
2020-09-29 18:47:02 UTC (rev 77276)
@@ -0,0 +1,60 @@
+#                   F I N D G D I A M . C M A K E
+# BRL-CAD
+#
+# Copyright (c) 2013-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+###
+# - Find Approximate Tight Bounding Box library
+#
+# The following variables are set:
+#
+#  GDIAM_INCLUDE_DIRS   - where to find gdiam.h, etc.
+#  GDIAM_LIBRARIES      - List of libraries when using gdiam.
+#  GDIAM_FOUND          - True if gdiam found.
+
+find_path(GDIAM_INCLUDE_DIR gdiam.h)
+find_library(GDIAM_LIBRARY NAMES gdiam)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDIAM DEFAULT_MSG GDIAM_LIBRARY 
GDIAM_INCLUDE_DIR)
+
+IF (GDIAM_FOUND)
+  set(GDIAM_INCLUDE_DIRS ${GDIAM_INCLUDE_DIR})
+  set(GDIAM_LIBRARIES    ${GDIAM_LIBRARY})
+endif()
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8


Property changes on: 
brlcad/branches/thirdparty_rework/misc/CMake/FindGDIAM.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/branches/thirdparty_rework/misc/CMake/FindPOLY2TRI.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/misc/CMake/FindPOLY2TRI.cmake             
                (rev 0)
+++ brlcad/branches/thirdparty_rework/misc/CMake/FindPOLY2TRI.cmake     
2020-09-29 18:47:02 UTC (rev 77276)
@@ -0,0 +1,60 @@
+#               F I N D P O L Y 2 T R I . C M A K E
+# BRL-CAD
+#
+# Copyright (c) 2013-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+###
+# - Find Constrained Delaunay Triangulation library
+#
+# The following variables are set:
+#
+#  POLY2TRI_INCLUDE_DIRS   - where to find poly2tri.h, etc.
+#  POLY2TRI_LIBRARIES      - List of libraries when using poly2tri.
+#  POLY2TRI_FOUND          - True if poly2tri found.
+
+find_path(POLY2TRI_INCLUDE_DIR poly2tri.h)
+find_library(POLY2TRI_LIBRARY NAMES poly2tri)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(POLY2TRI DEFAULT_MSG POLY2TRI_LIBRARY 
POLY2TRI_INCLUDE_DIR)
+
+if(POLY2TRI_FOUND)
+  set(POLY2TRI_INCLUDE_DIRS ${POLY2TRI_INCLUDE_DIR})
+  set(POLY2TRI_LIBRARIES    ${POLY2TRI_LIBRARY})
+endif()
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8


Property changes on: 
brlcad/branches/thirdparty_rework/misc/CMake/FindPOLY2TRI.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/branches/thirdparty_rework/misc/CMake/FindPROJ4.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/misc/CMake/FindPROJ4.cmake                
                (rev 0)
+++ brlcad/branches/thirdparty_rework/misc/CMake/FindPROJ4.cmake        
2020-09-29 18:47:02 UTC (rev 77276)
@@ -0,0 +1,58 @@
+###############################################################################
+# CMake module to search for PROJ.4 library
+#
+# On success, the macro sets the following variables:
+# PROJ4_FOUND       = if the library found
+# PROJ4_VERSION     = version number of PROJ.4 found
+# PROJ4_LIBRARIES   = full path to the library
+# PROJ4_INCLUDE_DIR = where to find the library headers 
+# Also defined, but not for general use are
+# PROJ4_LIBRARY, where to find the PROJ.4 library.
+#
+# Copyright (c) 2009 Mateusz Loskot <[email protected]>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+###############################################################################
+
+# Try to use OSGeo4W installation
+if(WIN32)
+    set(PROJ4_OSGEO4W_HOME "C:/OSGeo4W") 
+
+    if($ENV{OSGEO4W_HOME})
+        set(PROJ4_OSGEO4W_HOME "$ENV{OSGEO4W_HOME}") 
+    endif()
+endif()
+
+find_path(PROJ4_INCLUDE_DIR proj_api.h
+    PATHS ${PROJ4_OSGEO4W_HOME}/include
+    DOC "Path to PROJ.4 library include directory")
+
+if (PROJ4_INCLUDE_DIR)
+       # Extract version from proj_api.h (ex: 480)
+       file(STRINGS ${PROJ4_INCLUDE_DIR}/proj_api.h
+               PJ_VERSIONSTR
+               REGEX "#define[ ]+PJ_VERSION[ ]+[0-9]+")
+       string(REGEX MATCH "[0-9]+" PJ_VERSIONSTR ${PJ_VERSIONSTR})     
+
+       # TODO: Should be formatted as 4.8.0?
+       set(PROJ4_VERSION ${PJ_VERSIONSTR})
+endif()
+
+set(PROJ4_NAMES ${PROJ4_NAMES} proj proj_i)
+find_library(PROJ4_LIBRARY
+    NAMES ${PROJ4_NAMES}
+    PATHS ${PROJ4_OSGEO4W_HOME}/lib
+    DOC "Path to PROJ.4 library file")
+
+if(PROJ4_LIBRARY)
+  set(PROJ4_LIBRARIES ${PROJ4_LIBRARY})
+endif()
+
+# Handle the QUIETLY and REQUIRED arguments and set PROJ4_FOUND to TRUE
+# if all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PROJ4 DEFAULT_MSG
+       PROJ4_LIBRARY
+       PROJ4_INCLUDE_DIR)


Property changes on: 
brlcad/branches/thirdparty_rework/misc/CMake/FindPROJ4.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/branches/thirdparty_rework/misc/CMake/FindSPSR.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/misc/CMake/FindSPSR.cmake                 
        (rev 0)
+++ brlcad/branches/thirdparty_rework/misc/CMake/FindSPSR.cmake 2020-09-29 
18:47:02 UTC (rev 77276)
@@ -0,0 +1,60 @@
+#                   F I N D S P S R . C M A K E
+# BRL-CAD
+#
+# Copyright (c) 2013-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+###
+# - Find Screened Poisson Surface Reconstruction library
+#
+# The following variables are set:
+#
+#  SPSR_INCLUDE_DIRS   - where to find spsr.h, etc.
+#  SPSR_LIBRARIES      - List of libraries when using spsr.
+#  SPSR_FOUND          - True if spsr found.
+
+find_path(SPSR_INCLUDE_DIR spsr.h)
+find_library(SPSR_LIBRARY NAMES spsr spsrlib)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(SPSR DEFAULT_MSG SPSR_LIBRARY 
SPSR_INCLUDE_DIR)
+
+IF (SPSR_FOUND)
+  set(SPSR_INCLUDE_DIRS ${SPSR_INCLUDE_DIR})
+  set(SPSR_LIBRARIES    ${SPSR_LIBRARY})
+endif()
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8


Property changes on: brlcad/branches/thirdparty_rework/misc/CMake/FindSPSR.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/branches/thirdparty_rework/misc/CMake/FindSTEPCODE.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/misc/CMake/FindSTEPCODE.cmake             
                (rev 0)
+++ brlcad/branches/thirdparty_rework/misc/CMake/FindSTEPCODE.cmake     
2020-09-29 18:47:02 UTC (rev 77276)
@@ -0,0 +1,63 @@
+#                   F I N D V D S . C M A K E
+# BRL-CAD
+#
+# Copyright (c) 2013-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following
+# disclaimer in the documentation and/or other materials provided
+# with the distribution.
+#
+# 3. The name of the author may not be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+###
+# - Find STEPCODE
+#
+# TODO - this is a stub.  Doing this correctly means looking for
+# multiple libraries and headers
+
+# The following variables are set:
+#
+#  STEPCODE_INCLUDE_DIRS   - where to find vds.h, etc.
+#  STEPCODE_LIBRARIES      - List of libraries when using vds.
+#  STEPCODE_FOUND          - True if vds found.
+
+find_path(STEPCODE_INCLUDE_DIR stepcode.h)
+find_library(STEPCODE_LIBRARY NAMES stepcode)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(STEPCODE DEFAULT_MSG STEPCODE_LIBRARY 
STEPCODE_INCLUDE_DIR)
+
+if (STEPCODE_FOUND)
+  set(STEPCODE_INCLUDE_DIRS ${STEPCODE_INCLUDE_DIR})
+  set(STEPCODE_LIBRARIES    ${STEPCODE_LIBRARY})
+endif()
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8


Property changes on: 
brlcad/branches/thirdparty_rework/misc/CMake/FindSTEPCODE.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: 
brlcad/branches/thirdparty_rework/src/external/Unigraphics/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/external/Unigraphics/CMakeLists.txt   
2020-09-29 18:35:22 UTC (rev 77275)
+++ brlcad/branches/thirdparty_rework/src/external/Unigraphics/CMakeLists.txt   
2020-09-29 18:47:02 UTC (rev 77276)
@@ -15,7 +15,7 @@
       "${CMAKE_CURRENT_BINARY_DIR}/../../../include"
       "${CMAKE_CURRENT_SOURCE_DIR}/../../../include"
       "${CMAKE_CURRENT_SOURCE_DIR}/../../../src/other/openNURBS"
-      "${ZLIB_INCLUDE_DIRS}"
+      "${ZLIB_INCLUDE_DIR}"
       "${REGEX_INCLUDE_DIRS}"
       "${TCL_INCLUDE_PATH}"
       )

Modified: brlcad/branches/thirdparty_rework/src/other/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/other/CMakeLists.txt  2020-09-29 
18:35:22 UTC (rev 77275)
+++ brlcad/branches/thirdparty_rework/src/other/CMakeLists.txt  2020-09-29 
18:47:02 UTC (rev 77276)
@@ -85,137 +85,8 @@
   find_package(BSON)
 endif (BRLCAD_ENABLE_BINARY_ATTRIBUTES)
 
-if (BRLCAD_ENABLE_GDAL)
-  find_package(PROJ)
-  find_package(GDAL)
-endif (BRLCAD_ENABLE_GDAL)
-
 find_package(TCL)
 
-###############################################################################
-#                                 Tcl/Tk
-###############################################################################
-
-if (${CMAKE_PROJECT_NAME}_TCL_BUILD)
-
-  if(BRLCAD_ENABLE_TK)
-
-    #############
-    #   TkTable
-    #############
-
-    if (NOT MSVC)
-      # TODO - looks like this will require a CMake build after all - the 
Windows build included
-      # with the vanilla tarball is pretty hopeless...
-
-      set(TKTABLE_SRC_DIR 
"${CMAKE_CURRENT_BINARY_DIR}/TKTABLE_BLD-prefix/src/TKTABLE_BLD")
-      set(TKTABLE_VERSION 2.10)
-
-      # We need to set internal Tcl variables to the final install paths, not 
the intermediate install paths that
-      # Tcl's own build will think are the final paths.  Rather than attempt 
build system trickery we simply
-      # hard set the values in the source files by rewriting them.
-      configure_file(${BRLCAD_CMAKE_DIR}/tcl_replace.cxx.in 
${CMAKE_CURRENT_BINARY_DIR}/tktable_replace.cxx)
-      add_executable(tktable_replace 
${CMAKE_CURRENT_BINARY_DIR}/tktable_replace.cxx)
-
-      set(TKTABLE_PATCH_FILES "${TKTABLE_SRC_DIR}/configure" 
"${TKTABLE_SRC_DIR}/tclconfig/tcl.m4")
-      set(TKTABLE_REWORK_FILES 
"${TKTABLE_SRC_DIR}/generic/tkTableInitScript.h")
-
-      ExternalProject_Add(TKTABLE_BLD
-       URL "${CMAKE_CURRENT_SOURCE_DIR}/tktable"
-       BUILD_ALWAYS ${EXTERNAL_BUILD_UPDATE} ${LOG_OPTS}
-       PATCH_COMMAND rpath_replace "${CMAKE_BUILD_RPATH}" 
${TKTABLE_PATCH_FILES}
-       COMMAND tktable_replace ${TKTABLE_REWORK_FILES}
-       CONFIGURE_COMMAND CPPFLAGS=-I${CMAKE_BINARY_DIR}/${INCLUDE_DIR} 
LDFLAGS=-L${CMAKE_BINARY_DIR}/${LIB_DIR} ${TKTABLE_SRC_DIR}/configure 
--prefix=${CMAKE_BINARY_DIR} --with-tcl=${CMAKE_BINARY_DIR}/${LIB_DIR} 
--with-tk=${CMAKE_BINARY_DIR}/${LIB_DIR}
-       BUILD_COMMAND make -j${pcnt}
-       INSTALL_COMMAND make install
-       DEPENDS TK_BLD TCL_BLD
-       )
-    else (NOT MSVC)
-
-      ExternalProject_Add(TKTABLE_BLD
-       SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tk"
-       BUILD_ALWAYS ${EXTERNAL_BUILD_UPDATE} ${LOG_OPTS}
-       CONFIGURE_COMMAND ""
-       BINARY_DIR ${TKTABLE_SRC_DIR}/win
-       BUILD_COMMAND ${VCVARS_BAT} && nmake -f makefile.vc 
INSTALLDIR=${CMAKE_BINARY_DIR} TCLDIR=${TCL_SRC_DIR} TKDIR=${TK_SRC_DIR}
-       INSTALL_COMMAND ${VCVARS_BAT} && nmake -f makefile.vc install 
INSTALLDIR=${CMAKE_BINARY_DIR} TCLDIR=${TCL_SRC_DIR} TKDIR=${TK_SRC_DIR}
-       DEPENDS TK_BLD TCL_BLD
-       )
-
-    endif (NOT MSVC)
-
-
-    ExternalProject_Target(tktable TKTABLE_BLD
-      SUBDIR Tktable${TKTABLE_VERSION}
-      OUTPUT_FILE libTktable${TKTABLE_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}
-      )
-    ExternalProject_ByProducts(TKTABLE_BLD ${LIB_DIR}
-      Tktable${TKTABLE_VERSION}/README.txt
-      Tktable${TKTABLE_VERSION}/html/tkTable.html
-      Tktable${TKTABLE_VERSION}/tktable.py
-      Tktable${TKTABLE_VERSION}/license.txt
-      )
-    ExternalProject_ByProducts(TKTABLE_BLD ${LIB_DIR}
-      Tktable${TKTABLE_VERSION}/tkTable.tcl
-      FIXPATH
-      )
-
-    SetTargetFolder(TKTABLE_BLD "Third Party Libraries")
-    SetTargetFolder(tktable "Third Party Libraries")
-
-    #############
-    #   Tkhtml
-    #############
-
-    set(TKHTML_VERSION 3.0)
-
-    cmake_set_rpath(SUFFIX "Tkhtml${TKHTML_VERSION}")
-    message("CMAKE_BUILD_RPATH: ${CMAKE_BUILD_RPATH}")
-    ExternalProject_Add(TKHTML_BLD
-      SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tkhtml
-      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR} 
-DLIB_DIR=${LIB_DIR}
-      -DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/${LIB_DIR} 
-DCMAKE_INSTALL_RPATH=${CMAKE_BUILD_RPATH}
-      -DTCL_INCLUDE_DIRS=${CMAKE_BINARY_DIR}/${INCLUDE_DIR}
-      -DTCL_INCLUDE_PATH=${CMAKE_BINARY_DIR}/${INCLUDE_DIR}
-      
-DTCL_LIBRARY=${CMAKE_BINARY_DIR}/${LIB_DIR}/libtcl8.${TCL_MINOR_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}
-      
-DTCL_STUB_LIBRARY=${CMAKE_BINARY_DIR}/${LIB_DIR}/libtclstub8.${TCL_MINOR_VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX}
-      
-DTCL_TCLSH=${CMAKE_BINARY_DIR}/${BIN_DIR}/tclsh8.${TCL_MINOR_VERSION}${CMAKE_EXECUTABLE_SUFFIX}
-      
-DTCL_TCLSH_EXECUTABLE=${CMAKE_BINARY_DIR}/${BIN_DIR}/tclsh8.${TCL_MINOR_VERSION}${CMAKE_EXECUTABLE_SUFFIX}
-      -DTCL_TK_CONF_PREFIX=${CMAKE_BINARY_DIR}/${LIB_DIR}
-      
-DTCL_TK_LIBRARY=${CMAKE_BINARY_DIR}/${LIB_DIR}/libtk8.${TCL_MINOR_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}
-      
-DTCL_TK_STUB_LIBRARY=${CMAKE_BINARY_DIR}/${LIB_DIR}/libtkstub8.${TCL_MINOR_VERSION}${CMAKE_STATIC_LIBRARY_SUFFIX}
-      
-DTCL_WISH_EXECUTABLE=${CMAKE_BINARY_DIR}/${BIN_DIR}/wish8.${TCL_MINOR_VERSION}${CMAKE_EXECUTABLE_SUFFIX}
-      -DTK_INCLUDE_PATH=${CMAKE_BINARY_DIR}/${INCLUDE_DIR}
-      
-DTK_LIBRARY=${CMAKE_BINARY_DIR}/${LIB_DIR}/libtk8.${TCL_MINOR_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}
-      DEPENDS TCL_BLD TK_BLD
-      )
-    ExternalProject_Target(tkhtml TKHTML_BLD
-      SUBDIR Tkhtml${TKHTML_VERSION}
-      OUTPUT_FILE libTkhtml${CMAKE_SHARED_LIBRARY_SUFFIX}.${TKHTML_VERSION}
-      SYMLINKS "libTkhtml${CMAKE_SHARED_LIBRARY_SUFFIX}"
-      LINK_TARGET "libTkhtml${CMAKE_SHARED_LIBRARY_SUFFIX}"
-      RPATH
-      )
-    cmake_set_rpath("")
-
-    ExternalProject_ByProducts(TKHTML_BLD ${LIB_DIR}/Tkhtml${TKHTML_VERSION}
-      pkgIndex.tcl
-      FIXPATH
-      )
-
-    SetTargetFolder(TKHTML_BLD "Third Party Libraries")
-    SetTargetFolder(tkhtml "Third Party Libraries")
-
-  else(BRLCAD_ENABLE_TK)
-
-    set(HAVE_TK 0 CACHE STRING "C level Tk flag" FORCE)
-
-  endif(BRLCAD_ENABLE_TK)
-
-  mark_as_advanced(HAVE_TK)
-
-endif (${CMAKE_PROJECT_NAME}_TCL_BUILD)
-
 if(0)
 # OpenSceneGraph Libraries
 set(openscenegraph_DESCRIPTION "

Modified: brlcad/branches/thirdparty_rework/src/other/tkhtml/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/other/tkhtml/CMakeLists.txt   
2020-09-29 18:35:22 UTC (rev 77275)
+++ brlcad/branches/thirdparty_rework/src/other/tkhtml/CMakeLists.txt   
2020-09-29 18:47:02 UTC (rev 77276)
@@ -6,6 +6,8 @@
 
 find_package(TCL)
 
+include("${CMAKE_CURRENT_SOURCE_DIR}/TCL_PKGINDEX.cmake")
+
 if (TK_SYSTEM_GRAPHICS MATCHES "x11")
   find_package(X11)
 endif (TK_SYSTEM_GRAPHICS MATCHES "x11")

Modified: brlcad/branches/thirdparty_rework/src/other/tkhtml/TCL_PKGINDEX.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/other/tkhtml/TCL_PKGINDEX.cmake       
2020-09-29 18:35:22 UTC (rev 77275)
+++ brlcad/branches/thirdparty_rework/src/other/tkhtml/TCL_PKGINDEX.cmake       
2020-09-29 18:47:02 UTC (rev 77276)
@@ -50,7 +50,6 @@
     set(lld_build "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
     set(bpkgindex 
"${CMAKE_BINARY_DIR}/lib/${pkgname}${pkgversion}/pkgIndex.tcl")
     file(WRITE "${bpkgindex}" "package ifneeded ${pkgname} ${pkgversion} [list 
load [file join $dir \"${lld_build}\" ${lname}] ${pkgname}]")
-    DISTCLEAN("${CMAKE_BINARY_DIR}/lib/${pkgname}${pkgversion}")
   else(NOT CMAKE_CONFIGURATION_TYPES)
     foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
       string(TOUPPER "${CFG_TYPE}" CFG_TYPE_UPPER)
@@ -60,7 +59,6 @@
        set(lld_build "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}}")
       endif(MSVC)
       file(WRITE "${bpkgindex}" "package ifneeded ${pkgname} ${pkgversion} 
[list load [file join $dir \"${lld_build}\" ${lname}] ${pkgname}]")
-      
DISTCLEAN(${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}}/${pkgname}${pkgversion})
     endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
   endif(NOT CMAKE_CONFIGURATION_TYPES)
 
@@ -68,7 +66,6 @@
   set(ipkgindex "${CMAKE_CURRENT_BINARY_DIR}/pkgIndex.tcl")
   file(WRITE "${ipkgindex}" "package ifneeded ${pkgname} ${pkgversion} [list 
load [file join $dir .. .. \"${lld_install}\" ${lname}] ${pkgname}]")
   install(FILES "${ipkgindex}" DESTINATION lib/${pkgname}${pkgversion})
-  DISTCLEAN("${ipkgindex}")
 
 endfunction(TCL_PKGINDEX)
 

Modified: brlcad/branches/thirdparty_rework/src/other/tktable/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/other/tktable/CMakeLists.txt  
2020-09-29 18:35:22 UTC (rev 77275)
+++ brlcad/branches/thirdparty_rework/src/other/tktable/CMakeLists.txt  
2020-09-29 18:47:02 UTC (rev 77276)
@@ -6,6 +6,8 @@
 
 find_package(TCL)
 
+include("${CMAKE_CURRENT_SOURCE_DIR}/TCL_PKGINDEX.cmake")
+
 if (WIN32 OR "${TK_SYSTEM_GRAPHICS}" MATCHES "aqua")
   include_directories("${TK_SOURCE_DIR}/xlib/X11")
 else ()

Added: brlcad/branches/thirdparty_rework/src/other/tktable/TCL_PKGINDEX.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/other/tktable/TCL_PKGINDEX.cmake      
                        (rev 0)
+++ brlcad/branches/thirdparty_rework/src/other/tktable/TCL_PKGINDEX.cmake      
2020-09-29 18:47:02 UTC (rev 77276)
@@ -0,0 +1,77 @@
+#=============================================================================
+#
+# Copyright (c) 2010-2020 United States Government as represented by
+#                the U.S. Army Research Laboratory.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+#
+# * The names of the authors may not be used to endorse or promote
+#   products derived from this software without specific prior written
+#   permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+
+#============================================================
+# TCL_PKGINDEX
+#============================================================
+function(TCL_PKGINDEX target pkgname pkgversion)
+
+  # Identify the shared library suffix to be used
+  set(lname 
${CMAKE_SHARED_LIBRARY_PREFIX}${target}${CMAKE_SHARED_LIBRARY_SUFFIX})
+
+  # Create a "working" pkgIndex.tcl file that will allow
+  # the package to work from the build directory
+  set(lld_install "${LIB_DIR}")
+  if(MSVC)
+    set(lld_install "${BIN_DIR}")
+  endif(MSVC)
+  if(NOT CMAKE_CONFIGURATION_TYPES)
+    set(lld_build "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+    set(bpkgindex 
"${CMAKE_BINARY_DIR}/lib/${pkgname}${pkgversion}/pkgIndex.tcl")
+    file(WRITE "${bpkgindex}" "package ifneeded ${pkgname} ${pkgversion} [list 
load [file join $dir \"${lld_build}\" ${lname}] ${pkgname}]")
+  else(NOT CMAKE_CONFIGURATION_TYPES)
+    foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
+      string(TOUPPER "${CFG_TYPE}" CFG_TYPE_UPPER)
+      set(bpkgindex 
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}}/${pkgname}${pkgversion}/pkgIndex.tcl")
+      set(lld_build "${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}}")
+      if(MSVC)
+       set(lld_build "${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}}")
+      endif(MSVC)
+      file(WRITE "${bpkgindex}" "package ifneeded ${pkgname} ${pkgversion} 
[list load [file join $dir \"${lld_build}\" ${lname}] ${pkgname}]")
+    endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
+  endif(NOT CMAKE_CONFIGURATION_TYPES)
+
+  # Create the file Tcl will use once installed
+  set(ipkgindex "${CMAKE_CURRENT_BINARY_DIR}/pkgIndex.tcl")
+  file(WRITE "${ipkgindex}" "package ifneeded ${pkgname} ${pkgversion} [list 
load [file join $dir .. .. \"${lld_install}\" ${lname}] ${pkgname}]")
+  install(FILES "${ipkgindex}" DESTINATION lib/${pkgname}${pkgversion})
+
+endfunction(TCL_PKGINDEX)
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8


Property changes on: 
brlcad/branches/thirdparty_rework/src/other/tktable/TCL_PKGINDEX.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt     
2020-09-29 18:35:22 UTC (rev 77275)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt     
2020-09-29 18:47:02 UTC (rev 77276)
@@ -180,8 +180,9 @@
 include(${CMAKE_CURRENT_SOURCE_DIR}/itcl.cmake)
 include(${CMAKE_CURRENT_SOURCE_DIR}/itk.cmake)
 include(${CMAKE_CURRENT_SOURCE_DIR}/iwidgets.cmake)
+include(${CMAKE_CURRENT_SOURCE_DIR}/tktable.cmake)
+include(${CMAKE_CURRENT_SOURCE_DIR}/tkhtml.cmake)
 
-
 ###############################################################################
 #                    Primary BRL-CAD Compilation
 ###############################################################################

Added: brlcad/branches/thirdparty_rework/src/superbuild/tkhtml.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/tkhtml.cmake               
                (rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/tkhtml.cmake       
2020-09-29 18:47:02 UTC (rev 77276)
@@ -0,0 +1,86 @@
+# Unfortunately, there does not appear to be a reliable way to test for the
+# presence of the Tkhtml package on a system Tcl/Tk.  We key off of the 
presence
+# of the TK_BLD and ITCL_BLD targets, but that may produce a false negative if
+# those builds are both off but we still need Tkhtml.  As far as I can tell the
+# "package require Tkhtml" test (which is what is required to properly test 
for an
+# available Tkhtml package) can ONLY be performed successfully on a system that
+# supports creation of a graphics window. Window creation isn't typically
+# available on continuous integration runners, which means the test will always
+# fail there even when it shouldn't.
+
+# We try to find the Tkhtml library, since that's the only test we can do 
without
+# needing the graphical invocation.  Unfortunately, even a find_library search
+# looking for libTkhtml isn't completely reliable, since the presence of a 
shared
+# library is not a guarantee it is correctly hooked into the "package require"
+# mechanism of the system Tcl/Tk we want to use.  (It is possible to have more
+# than one Tcl/Tk on a system - this situation is known to have occurred on the
+# Mac when 3rd party package managers are used, for example.)
+
+if (BRLCAD_ENABLE_TK)
+
+  # Do what we can to make a sane decision on whether to build Tkhtml
+  set(DO_TKHTML_BUILD 0)
+  if (TARGET TK_BLD OR "${BRLCAD_TKHTML}" STREQUAL "BUNDLED")
+    set(DO_TKHTML_BUILD 1)
+  else (TARGET TK_BLD OR "${BRLCAD_TKHTML}" STREQUAL "BUNDLED")
+    find_library(TKHTML_SYS_LIBRARY NAMES Tkhtml tkhtml)
+    if (NOT TKHTML_SYS_LIBRARY)
+      set(DO_TKHTML_BUILD 1)
+    endif (NOT TKHTML_SYS_LIBRARY)
+  endif (TARGET TK_BLD OR "${BRLCAD_TKHTML}" STREQUAL "BUNDLED")
+
+  if (DO_TKHTML_BUILD)
+
+    set(TKHTML_VERSION_MAJOR 3)
+    set(TKHTML_VERSION_MINOR 0)
+    set(TKHTML_VERSION ${TKHTML_VERSION_MINOR}.${TKHTML_VERSION_MINOR})
+
+    if (MSVC)
+      set(TKHTML_BASENAME Tkhtml${TKHTML_VERSION_MAJOR}.${TK_VERSION_MINOR})
+      set(TKHTML_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
+    else (MSVC)
+      set(TKHTML_BASENAME libTkhtml)
+      set(TKHTML_SUFFIX 
${CMAKE_SHARED_LIBRARY_SUFFIX}.${TKHTML_VERSION_MAJOR}.${TKHTML_VERSION_MINOR})
+    endif (MSVC)
+
+    if (TARGET TCL_BLD)
+      set(TCL_TARGET TCL_BLD)
+    endif (TARGET TCL_BLD)
+
+    if (TARGET TK_BLD)
+      set(TK_TARGET TK_BLD)
+    endif (TARGET TK_BLD)
+
+    ExternalProject_Add(TKHTML_BLD
+      SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../other/tkhtml"
+      BUILD_ALWAYS ${EXTERNAL_BUILD_UPDATE} ${LOG_OPTS}
+      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR} 
-DCMAKE_INSTALL_LIBDIR=${LIB_DIR}
+      -DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/${LIB_DIR} 
-DCMAKE_INSTALL_RPATH=${CMAKE_BUILD_RPATH}
+      -DTCL_ROOT=$<$<BOOL:${TCL_TARGET}>:${CMAKE_BINARY_DIR}>
+      DEPENDS ${TCL_TARGET} ${TK_TARGET}
+      )
+    ExternalProject_Target(tkhtml TKHTML_BLD
+      SUBDIR Tkhtml${TKHTML_VERSION}
+      OUTPUT_FILE ${TKHTML_BASENAME}${TKHTML_SUFFIX}
+      SYMLINKS "${TKHTML_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
+      LINK_TARGET "${TKHTML_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
+      )
+    ExternalProject_ByProducts(TKHTML_BLD ${LIB_DIR}
+      Tkhtml${TKHTML_VERSION}/pkgIndex.tcl
+      FIXPATH
+      )
+
+    list(APPEND BRLCAD_DEPS TKHTML_BLD)
+
+    SetTargetFolder(TKHTML_BLD "Third Party Libraries")
+
+  endif (DO_TKHTML_BUILD)
+endif (BRLCAD_ENABLE_TK)
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
+


Property changes on: 
brlcad/branches/thirdparty_rework/src/superbuild/tkhtml.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/branches/thirdparty_rework/src/superbuild/tktable.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/tktable.cmake              
                (rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/tktable.cmake      
2020-09-29 18:47:02 UTC (rev 77276)
@@ -0,0 +1,90 @@
+# Unfortunately, there does not appear to be a reliable way to test for the
+# presence of the Tktable package on a system Tcl/Tk.  We key off of the 
presence
+# of the TK_BLD and ITCL_BLD targets, but that may produce a false negative if
+# those builds are both off but we still need Tktable.  As far as I can tell 
the
+# "package require Tktable" test (which is what is required to properly test 
for an
+# available Tktable package) can ONLY be performed successfully on a system 
that
+# supports creation of a graphics window. Window creation isn't typically
+# available on continuous integration runners, which means the test will always
+# fail there even when it shouldn't.
+
+# We try to find the Tktable library, since that's the only test we can do 
without
+# needing the graphical invocation.  Unfortunately, even a find_library search
+# looking for libTktable isn't completely reliable, since the presence of a 
shared
+# library is not a guarantee it is correctly hooked into the "package require"
+# mechanism of the system Tcl/Tk we want to use.  (It is possible to have more
+# than one Tcl/Tk on a system - this situation is known to have occurred on the
+# Mac when 3rd party package managers are used, for example.)
+
+if (BRLCAD_ENABLE_TK)
+
+  # Do what we can to make a sane decision on whether to build Tktable
+  set(DO_TKTABLE_BUILD 0)
+  if (TARGET TK_BLD OR "${BRLCAD_TKTABLE}" STREQUAL "BUNDLED")
+    set(DO_TKTABLE_BUILD 1)
+  else (TARGET TK_BLD OR "${BRLCAD_TKTABLE}" STREQUAL "BUNDLED")
+    find_library(TKTABLE_SYS_LIBRARY NAMES Tktable tktable)
+    if (NOT TKTABLE_SYS_LIBRARY)
+      set(DO_TKTABLE_BUILD 1)
+    endif (NOT TKTABLE_SYS_LIBRARY)
+  endif (TARGET TK_BLD OR "${BRLCAD_TKTABLE}" STREQUAL "BUNDLED")
+
+  if (DO_TKTABLE_BUILD)
+
+    set(TKTABLE_VERSION_MAJOR 2)
+    set(TKTABLE_VERSION_MINOR 10)
+    set(TKTABLE_VERSION ${TKTABLE_VERSION_MINOR}.${TKTABLE_VERSION_MINOR})
+
+    if (MSVC)
+      set(TKTABLE_BASENAME Tktable${TKTABLE_VERSION_MAJOR}.${TK_VERSION_MINOR})
+      set(TKTABLE_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
+    else (MSVC)
+      set(TKTABLE_BASENAME libTktable)
+      set(TKTABLE_SUFFIX 
${CMAKE_SHARED_LIBRARY_SUFFIX}.${TKTABLE_VERSION_MAJOR}.${TKTABLE_VERSION_MINOR})
+    endif (MSVC)
+
+    if (TARGET TCL_BLD)
+      set(TCL_TARGET TCL_BLD)
+    endif (TARGET TCL_BLD)
+
+    if (TARGET TK_BLD)
+      set(TK_TARGET TK_BLD)
+    endif (TARGET TK_BLD)
+
+    ExternalProject_Add(TKTABLE_BLD
+      SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../other/tktable"
+      BUILD_ALWAYS ${EXTERNAL_BUILD_UPDATE} ${LOG_OPTS}
+      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR} 
-DCMAKE_INSTALL_LIBDIR=${LIB_DIR}
+      -DCMAKE_PREFIX_PATH=${CMAKE_BINARY_DIR}/${LIB_DIR} 
-DCMAKE_INSTALL_RPATH=${CMAKE_BUILD_RPATH}
+      -DTCL_ROOT=$<$<BOOL:${TCL_TARGET}>:${CMAKE_BINARY_DIR}>
+      DEPENDS ${TCL_TARGET} ${TK_TARGET}
+      )
+    ExternalProject_Target(tktable TKTABLE_BLD
+      SUBDIR Tktable${TKTABLE_VERSION}
+      OUTPUT_FILE ${TKTABLE_BASENAME}${TKTABLE_SUFFIX}
+      SYMLINKS "${TKTABLE_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
+      LINK_TARGET "${TKTABLE_BASENAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
+      )
+    ExternalProject_ByProducts(TKTABLE_BLD ${LIB_DIR}
+      Tktable${TKTABLE_VERSION}/tktable.py
+      Tktable${TKTABLE_VERSION}/tkTable.tcl
+      )
+    ExternalProject_ByProducts(TKTABLE_BLD ${LIB_DIR}
+      Tktable${TKTABLE_VERSION}/pkgIndex.tcl
+      FIXPATH
+      )
+
+    list(APPEND BRLCAD_DEPS TKTABLE_BLD)
+
+    SetTargetFolder(TKTABLE_BLD "Third Party Libraries")
+
+  endif (DO_TKTABLE_BUILD)
+endif (BRLCAD_ENABLE_TK)
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
+


Property changes on: 
brlcad/branches/thirdparty_rework/src/superbuild/tktable.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
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

Reply via email to