Revision: 77582
http://sourceforge.net/p/brlcad/code/77582
Author: starseeker
Date: 2020-10-23 02:45:31 +0000 (Fri, 23 Oct 2020)
Log Message:
-----------
Add Find modules for use in 3rd party building. Ideally we want this directory
to build stand-alone, if that proves practical...
Added Paths:
-----------
brlcad/branches/extbuild/src/other/ext/CMake/
brlcad/branches/extbuild/src/other/ext/CMake/FindBSON.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindLEMON.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindNETPBM.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindOPENNURBS.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindPERPLEX.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindPOLY2TRI.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindPROJ4.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindRE2C.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindREGEX.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindSTEPCODE.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindTCL.cmake
brlcad/branches/extbuild/src/other/ext/CMake/FindUTAHRLE.cmake
Added: brlcad/branches/extbuild/src/other/ext/CMake/FindBSON.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindBSON.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindBSON.cmake 2020-10-23
02:45:31 UTC (rev 77582)
@@ -0,0 +1,94 @@
+# From
https://github.com/mongodb/mongo-c-driver/blob/master/build/cmake/FindBSON.cmake
+# License: Apache License Version 2.0, January 2004
+
+# Read-Only variables:
+# BSON_FOUND - system has the BSON library
+# BSON_INCLUDE_DIR - the BSON include directory
+# BSON_LIBRARIES - The libraries needed to use BSON
+# BSON_VERSION - This is set to $major.$minor.$revision$path (eg. 0.4.1)
+
+if (UNIX)
+ find_package(PkgConfig QUIET)
+ pkg_check_modules(_BSON QUIET libbson-1.0)
+endif ()
+
+find_path(BSON_INCLUDE_DIR
+ NAMES
+ libbson-1.0/bson.h
+ HINTS
+ ${BSON_ROOT_DIR}
+ ${_BSON_INCLUDEDIR}
+ PATH_SUFFIXES
+ include
+)
+
+set(BSON_INCLUDE_DIR "${BSON_INCLUDE_DIR}/libbson-1.0")
+
+if(WIN32 AND NOT CYGWIN)
+ if(MSVC)
+ find_library(BSON
+ NAMES
+ "bson-1.0"
+ HINTS
+ ${BSON_ROOT_DIR}
+ PATH_SUFFIXES
+ bin
+ lib
+ )
+
+ mark_as_advanced(BSON)
+ set(BSON_LIBRARIES ${BSON} ws2_32)
+ else()
+ # bother supporting this?
+ endif()
+else()
+
+ find_library(BSON_LIBRARY
+ NAMES
+ bson-1.0
+ HINTS
+ ${_BSON_LIBDIR}
+ PATH_SUFFIXES
+ lib
+ )
+
+ mark_as_advanced(BSON_LIBRARY)
+
+ find_package (Threads REQUIRED)
+
+ set(BSON_LIBRARIES ${BSON_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+
+endif()
+
+if (BSON_INCLUDE_DIR)
+ if (_BSON_VERSION)
+ set(BSON_VERSION "${_BSON_VERSION}")
+ elseif(BSON_INCLUDE_DIR AND EXISTS "${BSON_INCLUDE_DIR}/bson-version.h")
+ file(STRINGS "${BSON_INCLUDE_DIR}/bson-version.h" bson_version_str
+ REGEX "^#define[\t ]+BSON_VERSION[\t ]+\([0-9.]+\)[\t ]+$")
+
+ string(REGEX REPLACE "^.*BSON_VERSION[\t ]+\([0-9.]+\)[\t ]+$"
+ "\\1" BSON_VERSION "${bson_version_str}")
+ endif ()
+endif ()
+
+include(FindPackageHandleStandardArgs)
+
+if (BSON_VERSION)
+ find_package_handle_standard_args(BSON
+ REQUIRED_VARS
+ BSON_LIBRARIES
+ BSON_INCLUDE_DIR
+ VERSION_VAR
+ BSON_VERSION
+ FAIL_MESSAGE
+ "Could NOT find BSON version"
+ )
+else ()
+ find_package_handle_standard_args(BSON "Could NOT find BSON"
+ BSON_LIBRARIES
+ BSON_INCLUDE_DIR
+ )
+endif ()
+
+mark_as_advanced(BSON_INCLUDE_DIR BSON_LIBRARIES)
Property changes on: brlcad/branches/extbuild/src/other/ext/CMake/FindBSON.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/extbuild/src/other/ext/CMake/FindLEMON.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindLEMON.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindLEMON.cmake
2020-10-23 02:45:31 UTC (rev 77582)
@@ -0,0 +1,241 @@
+#
+# - Find lemon executable and provides macros to generate custom build rules
+# The module defines the following variables
+#
+# LEMON_EXECUTABLE - path to the lemon program
+# LEMON_TEMPLATE - location of the lemon template file
+
+#=============================================================================
+# F I N D L E M O N . C M A K E
+#
+# Originally based off of FindBISON.cmake from Kitware's CMake distribution
+#
+# Copyright (c) 2010-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+# Copyright 2009 Kitware, Inc.
+# Copyright 2006 Tristan Carel
+# 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.
+#=============================================================================
+
+set(_LEMON_SEARCHES)
+
+# Search LEMON_ROOT first if it is set.
+if(LEMON_ROOT)
+ set(_LEMON_SEARCH_ROOT PATHS ${LEMON_ROOT} NO_DEFAULT_PATH)
+ list(APPEND _LEMON_SEARCHES _LEMON_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_LEMON_x86 "(x86)")
+set(_LEMON_SEARCH_NORMAL
+ PATHS "$ENV{ProgramFiles}/lemon"
+ "$ENV{ProgramFiles${_LEMON_x86}}/lemon")
+unset(_LEMON_x86)
+list(APPEND _LEMON_SEARCHES _LEMON_SEARCH_NORMAL)
+
+set(LEMON_NAMES lemon)
+
+# Try each search configuration.
+foreach(search ${_LEMON_SEARCHES})
+ find_program(LEMON_EXECUTABLE lemon ${${search}} PATH_SUFFIXES bin)
+endforeach()
+mark_as_advanced(LEMON_EXECUTABLE)
+
+foreach(search ${_LEMON_SEARCHES})
+ find_file(LEMON_TEMPLATE lempar.c ${${search}} PATH_SUFFIXES ${DATA_DIR}
${DATA_DIR}/lemon)
+endforeach()
+mark_as_advanced(LEMON_TEMPLATE)
+
+if (LEMON_EXECUTABLE AND NOT LEMON_TEMPLATE)
+ # look for the template in share
+ if (DATA_DIR AND EXISTS "${DATA_DIR}/lemon/lempar.c")
+ set (LEMON_TEMPLATE "${DATA_DIR}/lemon/lempar.c")
+ elseif (EXISTS "share/lemon/lempar.c")
+ set (LEMON_TEMPLATE "share/lemon/lempar.c")
+ elseif (EXISTS "/usr/share/lemon/lempar.c")
+ set (LEMON_TEMPLATE "/usr/share/lemon/lempar.c")
+ endif (DATA_DIR AND EXISTS "${DATA_DIR}/lemon/lempar.c")
+endif (LEMON_EXECUTABLE AND NOT LEMON_TEMPLATE)
+
+if (LEMON_EXECUTABLE AND NOT LEMON_TEMPLATE)
+ # look for the template in bin dir
+ get_filename_component(lemon_path ${LEMON_EXECUTABLE} PATH)
+ if (lemon_path)
+ if (EXISTS ${lemon_path}/lempar.c)
+ set (LEMON_TEMPLATE "${lemon_path}/lempar.c")
+ endif (EXISTS ${lemon_path}/lempar.c)
+ if (EXISTS /usr/share/lemon/lempar.c)
+ set (LEMON_TEMPLATE "/usr/share/lemon/lempar.c")
+ endif (EXISTS /usr/share/lemon/lempar.c)
+ endif (lemon_path)
+endif(LEMON_EXECUTABLE AND NOT LEMON_TEMPLATE)
+
+if (LEMON_EXECUTABLE AND NOT LEMON_TEMPLATE)
+ # fallback
+ set (LEMON_TEMPLATE "lempar.c")
+ if (NOT EXISTS ${LEMON_TEMPLATE})
+ message(WARNING "Lemon's lempar.c template file could not be found
automatically, set LEMON_TEMPLATE")
+ endif (NOT EXISTS ${LEMON_TEMPLATE})
+endif (LEMON_EXECUTABLE AND NOT LEMON_TEMPLATE)
+
+mark_as_advanced(LEMON_TEMPLATE)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LEMON DEFAULT_MSG LEMON_EXECUTABLE
LEMON_TEMPLATE)
+
+# Define the macro
+# LEMON_TARGET(<Name> <LemonInput> <LemonSource> <LemonHeader>
+# [<ArgString>])
+# which will create a custom rule to generate a parser. <LemonInput> is
+# the path to a lemon file. <LemonSource> is the desired name for the
+# generated source file. <LemonHeader> is the desired name for the
+# generated header which contains the token list. Anything in the optional
+# <ArgString> parameter is appended to the lemon command line.
+#
+# ====================================================================
+# Example:
+#
+# find_package(LEMON)
+# LEMON_TARGET(MyParser parser.y parser.c parser.h)
+# add_executable(Foo main.cpp ${LEMON_MyParser_OUTPUTS})
+# ====================================================================
+
+include(CMakeParseArguments)
+
+if(NOT COMMAND LEMON_TARGET)
+ macro(LEMON_TARGET Name Input)
+
+ get_filename_component(IN_FILE_WE ${Input} NAME_WE)
+ set(LVAR_PREFIX ${Name}_${IN_FILE_WE})
+
+ if(${ARGC} GREATER 3)
+ CMAKE_PARSE_ARGUMENTS(${LVAR_PREFIX} ""
"OUT_SRC_FILE;OUT_HDR_FILE;WORKING_DIR;EXTRA_ARGS" "" ${ARGN})
+ endif(${ARGC} GREATER 3)
+
+ if (TARGET perplex_stage)
+ set(DEPS_TARGET perplex_stage)
+ endif (TARGET perplex_stage)
+
+ # Need a working directory
+ if("${${LVAR_PREFIX}_WORKING_DIR}" STREQUAL "")
+ set(${LVAR_PREFIX}_WORKING_DIR
"${CMAKE_CURRENT_BINARY_DIR}/${LVAR_PREFIX}")
+ endif("${${LVAR_PREFIX}_WORKING_DIR}" STREQUAL "")
+ file(MAKE_DIRECTORY ${${LVAR_PREFIX}_WORKING_DIR})
+
+ # Output source file
+ if ("${${LVAR_PREFIX}_OUT_SRC_FILE}" STREQUAL "")
+ set(${LVAR_PREFIX}_OUT_SRC_FILE
${${LVAR_PREFIX}_WORKING_DIR}/${IN_FILE_WE}.c)
+ else ("${${LVAR_PREFIX}_OUT_SRC_FILE}" STREQUAL "")
+ get_filename_component(specified_out_dir ${${LVAR_PREFIX}_OUT_SRC_FILE}
PATH)
+ if(NOT "${specified_out_dir}" STREQUAL "")
+ message(FATAL_ERROR "\nFull path specified for OUT_SRC_FILE - should be
filename only.\n")
+ endif(NOT "${specified_out_dir}" STREQUAL "")
+ set(${LVAR_PREFIX}_OUT_SRC_FILE
${${LVAR_PREFIX}_WORKING_DIR}/${${LVAR_PREFIX}_OUT_SRC_FILE})
+ endif ("${${LVAR_PREFIX}_OUT_SRC_FILE}" STREQUAL "")
+
+ # Output header file
+ if ("${${LVAR_PREFIX}_OUT_HDR_FILE}" STREQUAL "")
+ set(${LVAR_PREFIX}_OUT_HDR_FILE
${${LVAR_PREFIX}_WORKING_DIR}/${IN_FILE_WE}.h)
+ else ("${${LVAR_PREFIX}_OUT_HDR_FILE}" STREQUAL "")
+ get_filename_component(specified_out_dir ${${LVAR_PREFIX}_OUT_HDR_FILE}
PATH)
+ if(NOT "${specified_out_dir}" STREQUAL "")
+ message(FATAL_ERROR "\nFull path specified for OUT_HDR_FILE - should be
filename only.\n")
+ endif(NOT "${specified_out_dir}" STREQUAL "")
+ set(${LVAR_PREFIX}_OUT_HDR_FILE
${${LVAR_PREFIX}_WORKING_DIR}/${${LVAR_PREFIX}_OUT_HDR_FILE})
+ endif ("${${LVAR_PREFIX}_OUT_HDR_FILE}" STREQUAL "")
+
+ # input file
+ get_filename_component(in_full ${Input} ABSOLUTE)
+ if("${in_full}" STREQUAL "${Input}")
+ set(lemon_in_file ${Input})
+ else("${in_full}" STREQUAL "${Input}")
+ set(lemon_in_file "${CMAKE_CURRENT_SOURCE_DIR}/${Input}")
+ endif("${in_full}" STREQUAL "${Input}")
+
+
+ # names of lemon output files will be based on the name of the input file
+ set(LEMON_GEN_SOURCE ${${LVAR_PREFIX}_WORKING_DIR}/${IN_FILE_WE}.c)
+ set(LEMON_GEN_HEADER ${${LVAR_PREFIX}_WORKING_DIR}/${IN_FILE_WE}.h)
+ set(LEMON_GEN_OUT ${${LVAR_PREFIX}_WORKING_DIR}/${IN_FILE_WE}.out)
+
+ # copy input to bin directory and run lemon
+ get_filename_component(INPUT_NAME ${Input} NAME)
+ add_custom_command(
+ OUTPUT ${LEMON_GEN_OUT} ${LEMON_GEN_SOURCE} ${LEMON_GEN_HEADER}
+ COMMAND ${CMAKE_COMMAND} -E copy ${lemon_in_file}
${${LVAR_PREFIX}_WORKING_DIR}/${INPUT_NAME}
+ COMMAND ${LEMON_EXECUTABLE} -T${LEMON_TEMPLATE}
${${LVAR_PREFIX}_WORKING_DIR}/${INPUT_NAME} ${${LVAR_PREFIX}__EXTRA_ARGS}
+ DEPENDS ${Input} ${LEMON_EXECUTABLE_TARGET} ${DEPS_TARGET}
+ WORKING_DIRECTORY ${${LVAR_PREFIX}_WORKING_DIR}
+ COMMENT "[LEMON][${Name}] Building parser with ${LEMON_EXECUTABLE}"
+ )
+
+ # rename generated outputs
+ if(NOT "${${LVAR_PREFIX}_OUT_SRC_FILE}" STREQUAL "${LEMON_GEN_SOURCE}")
+ add_custom_command(
+ OUTPUT ${${LVAR_PREFIX}_OUT_SRC_FILE}
+ COMMAND ${CMAKE_COMMAND} -E copy ${LEMON_GEN_SOURCE}
${${LVAR_PREFIX}_OUT_SRC_FILE}
+ DEPENDS ${LemonInput} ${LEMON_EXECUTABLE_TARGET} ${LEMON_GEN_SOURCE}
${DEPS_TARGET}
+ )
+ set(LEMON_${Name}_OUTPUTS ${${LVAR_PREFIX}_OUT_SRC_FILE}
${LEMON_${Name}_OUTPUTS})
+ endif(NOT "${${LVAR_PREFIX}_OUT_SRC_FILE}" STREQUAL "${LEMON_GEN_SOURCE}")
+ if(NOT "${${LVAR_PREFIX}_OUT_HDR_FILE}" STREQUAL "${LEMON_GEN_HEADER}")
+ add_custom_command(
+ OUTPUT ${${LVAR_PREFIX}_OUT_HDR_FILE}
+ COMMAND ${CMAKE_COMMAND} -E copy ${LEMON_GEN_HEADER}
${${LVAR_PREFIX}_OUT_HDR_FILE}
+ DEPENDS ${LemonInput} ${LEMON_EXECUTABLE_TARGET} ${LEMON_GEN_HEADER}
${DEPS_TARGET}
+ )
+ set(LEMON_${Name}_OUTPUTS ${${LVAR_PREFIX}_OUT_HDR_FILE}
${LEMON_${Name}_OUTPUTS})
+ endif(NOT "${${LVAR_PREFIX}_OUT_HDR_FILE}" STREQUAL "${LEMON_GEN_HEADER}")
+
+ set(LEMON_${Name}_OUTPUTS ${LEMON_${Name}_OUTPUTS} ${LEMON_GEN_OUT})
+
+ # make sure we clean up generated output and copied input
+ set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
"${LEMON_${Name}_OUTPUTS}")
+ set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
"${${LVAR_PREFIX}_WORKING_DIR}/${INPUT_NAME}")
+
+ # macro ran successfully
+ set(LEMON_${Name}_DEFINED TRUE)
+
+ set(LEMON_${Name}_SRC ${${LVAR_PREFIX}_OUT_SRC_FILE})
+ set(LEMON_${Name}_HDR ${${LVAR_PREFIX}_OUT_HDR_FILE})
+ set(LEMON_${Name}_INCLUDE_DIR ${${LVAR_PREFIX}_WORKING_DIR})
+
+ endmacro(LEMON_TARGET)
+endif(NOT COMMAND LEMON_TARGET)
+
+#============================================================
+# FindLEMON.cmake ends here
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
Property changes on:
brlcad/branches/extbuild/src/other/ext/CMake/FindLEMON.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/extbuild/src/other/ext/CMake/FindNETPBM.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindNETPBM.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindNETPBM.cmake
2020-10-23 02:45:31 UTC (rev 77582)
@@ -0,0 +1,102 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindNETPBM
+--------
+
+Find the native NETPBM includes and library.
+
+IMPORTED Targets
+^^^^^^^^^^^^^^^^
+
+This module defines :prop_tgt:`IMPORTED` target ``NETPBM::NETPBM``, if
+NETPBM has been found.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+::
+
+ NETPBM_INCLUDE_DIRS - where to find pam.h, etc.
+ NETPBM_LIBRARIES - List of libraries when using netpbm.
+ NETPBM_FOUND - True if netpbm found.
+
+Hints
+^^^^^
+
+A user may set ``NETPBM_ROOT`` to a netpbm installation root to tell this
+module where to look.
+#]=======================================================================]
+
+set(_NETPBM_SEARCHES)
+
+# Search NETPBM_ROOT first if it is set.
+if(NETPBM_ROOT)
+ set(_NETPBM_SEARCH_ROOT PATHS ${NETPBM_ROOT} NO_DEFAULT_PATH)
+ list(APPEND _NETPBM_SEARCHES _NETPBM_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_NETPBM_x86 "(x86)")
+set(_NETPBM_SEARCH_NORMAL
+ PATHS "$ENV{ProgramFiles}/netpbm"
+ "$ENV{ProgramFiles${_NETPBM_x86}}/netpbm")
+unset(_NETPBM_x86)
+list(APPEND _NETPBM_SEARCHES _NETPBM_SEARCH_NORMAL)
+
+set(NETPBM_NAMES netpbm)
+
+# Try each search configuration.
+foreach(search ${_NETPBM_SEARCHES})
+ find_path(NETPBM_INCLUDE_DIR NAMES pam.h ${${search}} PATH_SUFFIXES include
include/netpbm netpbm)
+endforeach()
+
+# Allow NETPBM_LIBRARY to be set manually, as the location of the netpbm
library
+if(NOT NETPBM_LIBRARY)
+ foreach(search ${_NETPBM_SEARCHES})
+ find_library(NETPBM_LIBRARY NAMES ${NETPBM_NAMES} NAMES_PER_DIR
${${search}} PATH_SUFFIXES lib)
+ endforeach()
+endif()
+
+unset(NETPBM_NAMES)
+
+mark_as_advanced(NETPBM_INCLUDE_DIR)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETPBM REQUIRED_VARS NETPBM_LIBRARY
NETPBM_INCLUDE_DIR)
+
+if(NETPBM_FOUND)
+ set(NETPBM_INCLUDE_DIRS ${NETPBM_INCLUDE_DIR})
+
+ if(NOT NETPBM_LIBRARIES)
+ set(NETPBM_LIBRARIES ${NETPBM_LIBRARY})
+ endif()
+
+ if(NOT TARGET NETPBM::NETPBM)
+ add_library(NETPBM::NETPBM UNKNOWN IMPORTED)
+ set_target_properties(NETPBM::NETPBM PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${NETPBM_INCLUDE_DIRS}")
+
+ if(NETPBM_LIBRARY_RELEASE)
+ set_property(TARGET NETPBM::NETPBM APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(NETPBM::NETPBM PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${NETPBM_LIBRARY_RELEASE}")
+ endif()
+
+ if(NETPBM_LIBRARY_DEBUG)
+ set_property(TARGET NETPBM::NETPBM APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(NETPBM::NETPBM PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${NETPBM_LIBRARY_DEBUG}")
+ endif()
+
+ if(NOT NETPBM_LIBRARY_RELEASE AND NOT NETPBM_LIBRARY_DEBUG)
+ set_property(TARGET NETPBM::NETPBM APPEND PROPERTY
+ IMPORTED_LOCATION "${NETPBM_LIBRARY}")
+ endif()
+ endif()
+endif()
Property changes on:
brlcad/branches/extbuild/src/other/ext/CMake/FindNETPBM.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/extbuild/src/other/ext/CMake/FindOPENNURBS.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindOPENNURBS.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindOPENNURBS.cmake
2020-10-23 02:45:31 UTC (rev 77582)
@@ -0,0 +1,102 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindOPENNURBS
+--------
+
+Find the native OPENNURBS includes and library.
+
+IMPORTED Targets
+^^^^^^^^^^^^^^^^
+
+This module defines :prop_tgt:`IMPORTED` target ``OPENNURBS::OPENNURBS``, if
+OPENNURBS has been found.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+::
+
+ OPENNURBS_INCLUDE_DIRS - where to find opennurbs.h, etc.
+ OPENNURBS_LIBRARIES - List of libraries when using openNURBS.
+ OPENNURBS_FOUND - True if openNURBS found.
+
+Hints
+^^^^^
+
+A user may set ``OPENNURBS_ROOT`` to a openNURBS installation root to tell this
+module where to look.
+#]=======================================================================]
+
+set(_OPENNURBS_SEARCHES)
+
+# Search OPENNURBS_ROOT first if it is set.
+if(OPENNURBS_ROOT)
+ set(_OPENNURBS_SEARCH_ROOT PATHS ${OPENNURBS_ROOT} NO_DEFAULT_PATH)
+ list(APPEND _OPENNURBS_SEARCHES _OPENNURBS_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_OPENNURBS_x86 "(x86)")
+set(_OPENNURBS_SEARCH_NORMAL
+ PATHS "$ENV{ProgramFiles}/openNURBS"
+ "$ENV{ProgramFiles${_OPENNURBS_x86}}/openNURBS")
+unset(_OPENNURBS_x86)
+list(APPEND _OPENNURBS_SEARCHES _OPENNURBS_SEARCH_NORMAL)
+
+set(OPENNURBS_NAMES openNURBS)
+
+# Try each search configuration.
+foreach(search ${_OPENNURBS_SEARCHES})
+ find_path(OPENNURBS_INCLUDE_DIR NAMES opennurbs.h ${${search}} PATH_SUFFIXES
include include/openNURBS openNURBS)
+endforeach()
+
+# Allow OPENNURBS_LIBRARY to be set manually, as the location of the openNURBS
library
+if(NOT OPENNURBS_LIBRARY)
+ foreach(search ${_OPENNURBS_SEARCHES})
+ find_library(OPENNURBS_LIBRARY NAMES ${OPENNURBS_NAMES} NAMES_PER_DIR
${${search}} PATH_SUFFIXES lib)
+ endforeach()
+endif()
+
+unset(OPENNURBS_NAMES)
+
+mark_as_advanced(OPENNURBS_INCLUDE_DIR)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENNURBS REQUIRED_VARS OPENNURBS_LIBRARY
OPENNURBS_INCLUDE_DIR)
+
+if(OPENNURBS_FOUND)
+ set(OPENNURBS_INCLUDE_DIRS ${OPENNURBS_INCLUDE_DIR})
+
+ if(NOT OPENNURBS_LIBRARIES)
+ set(OPENNURBS_LIBRARIES ${OPENNURBS_LIBRARY})
+ endif()
+
+ if(NOT TARGET OPENNURBS::OPENNURBS)
+ add_library(OPENNURBS::OPENNURBS UNKNOWN IMPORTED)
+ set_target_properties(OPENNURBS::OPENNURBS PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${OPENNURBS_INCLUDE_DIRS}")
+
+ if(OPENNURBS_LIBRARY_RELEASE)
+ set_property(TARGET OPENNURBS::OPENNURBS APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(OPENNURBS::OPENNURBS PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${OPENNURBS_LIBRARY_RELEASE}")
+ endif()
+
+ if(OPENNURBS_LIBRARY_DEBUG)
+ set_property(TARGET OPENNURBS::OPENNURBS APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(OPENNURBS::OPENNURBS PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${OPENNURBS_LIBRARY_DEBUG}")
+ endif()
+
+ if(NOT OPENNURBS_LIBRARY_RELEASE AND NOT OPENNURBS_LIBRARY_DEBUG)
+ set_property(TARGET OPENNURBS::OPENNURBS APPEND PROPERTY
+ IMPORTED_LOCATION "${OPENNURBS_LIBRARY}")
+ endif()
+ endif()
+endif()
Property changes on:
brlcad/branches/extbuild/src/other/ext/CMake/FindOPENNURBS.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/extbuild/src/other/ext/CMake/FindPERPLEX.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindPERPLEX.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindPERPLEX.cmake
2020-10-23 02:45:31 UTC (rev 77582)
@@ -0,0 +1,290 @@
+#
+# - Find perplex executable and provides macros to generate custom build rules
+# The module defines the following variables
+#
+# PERPLEX_EXECUTABLE - path to the perplex program
+# PERPLEX_TEMPLATE - location of the perplex template file
+
+#=============================================================================
+# F I N D P E R P L E X . C M A K E
+#
+# Originally based off of FindBISON.cmake from Kitware's CMake distribution
+#
+# Copyright (c) 2010-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+# Copyright 2009 Kitware, Inc.
+# Copyright 2006 Tristan Carel
+# 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.
+#=============================================================================
+
+set(_PERPLEX_SEARCHES)
+
+# Search PERPLEX_ROOT first if it is set.
+if(PERPLEX_ROOT)
+ set(_PERPLEX_SEARCH_ROOT PATHS ${PERPLEX_ROOT} NO_DEFAULT_PATH)
+ list(APPEND _PERPLEX_SEARCHES _PERPLEX_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_PERPLEX_x86 "(x86)")
+set(_PERPLEX_SEARCH_NORMAL
+ PATHS "$ENV{ProgramFiles}/perplex"
+ "$ENV{ProgramFiles${_PERPLEX_x86}}/perplex")
+unset(_PERPLEX_x86)
+list(APPEND _PERPLEX_SEARCHES _PERPLEX_SEARCH_NORMAL)
+
+set(PERPLEX_NAMES perplex)
+
+# Try each search configuration.
+foreach(search ${_PERPLEX_SEARCHES})
+ find_program(PERPLEX_EXECUTABLE perplex ${${search}} PATH_SUFFIXES bin)
+endforeach()
+mark_as_advanced(PERPLEX_EXECUTABLE)
+
+foreach(search ${_PERPLEX_SEARCHES})
+ find_file(PERPLEX_TEMPLATE perplex_template.c ${${search}} PATH_SUFFIXES
${DATA_DIR} ${DATA_DIR}/perplex)
+endforeach()
+mark_as_advanced(PERPLEX_TEMPLATE)
+
+if(PERPLEX_EXECUTABLE AND NOT PERPLEX_TEMPLATE)
+ get_filename_component(perplex_path ${PERPLEX_EXECUTABLE} PATH)
+ if(perplex_path)
+ set(PERPLEX_TEMPLATE "")
+ if(EXISTS ${perplex_path}/../share/perplex/perplex_template.c)
+ get_filename_component(perplex_template_path
"${perplex_path}/../share/perplex/perplex_template.c" ABSOLUTE)
+ set(PERPLEX_TEMPLATE "${perplex_template_path}")
+ endif(EXISTS ${perplex_path}/../share/perplex/perplex_template.c)
+ if(EXISTS ${perplex_path}/../share/perplex_template.c AND NOT
PERPLEX_TEMPLATE)
+ get_filename_component(perplex_template_path
"${perplex_path}/../share/perplex_template.c" ABSOLUTE)
+ set(PERPLEX_TEMPLATE "${perplex_template_path}")
+ endif(EXISTS ${perplex_path}/../share/perplex_template.c AND NOT
PERPLEX_TEMPLATE)
+ endif(perplex_path)
+ if(EXISTS /usr/share/perplex/perplex_template.c AND NOT PERPLEX_TEMPLATE)
+ set(PERPLEX_TEMPLATE "/usr/share/perplex/perplex_template.c")
+ endif(EXISTS /usr/share/perplex/perplex_template.c AND NOT PERPLEX_TEMPLATE)
+endif(PERPLEX_EXECUTABLE AND NOT PERPLEX_TEMPLATE)
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PERPLEX DEFAULT_MSG PERPLEX_EXECUTABLE
PERPLEX_TEMPLATE)
+mark_as_advanced(PERPLEX_TEMPLATE)
+
+# Defines two macros - PERPLEX_TARGET, which takes perplex inputs and
+# runs both perplex and re2c to generate C source code/headers, and
+# ADD_PERPLEX_LEMON_DEPENDENCY which is used to set up dependencies between
+# scanner and parser targets when necessary.
+#
+# #====================================================================
+# Example:
+#
+# find_package(LEMON)
+# find_package(RE2C)
+# find_package(PERPLEX)
+#
+# LEMON_TARGET(MyParser parser.y "${CMAKE_CURRENT_BINARY_DIR}/parser.cpp")
+# PERPLEX_TARGET(MyScanner scanner.re
"${CMAKE_CURRENT_BINARY_DIR}/scanner.cpp"
"${CMAKE_CURRENT_BINARY_DIR}/scanner_header.hpp")
+# ADD_PERPLEX_LEMON_DEPENDENCY(MyScanner MyParser)
+#
+# include_directories("${CMAKE_CURRENT_BINARY_DIR}")
+# add_executable(Foo
+# Foo.cc
+# ${LEMON_MyParser_OUTPUTS}
+# ${PERPLEX_MyScanner_OUTPUTS}
+# )
+# ====================================================================
+#
+#=============================================================================
+#
+# Originally based off of FindBISON.cmake from Kitware's CMake distribution
+#
+# Copyright (c) 2010-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+# Copyright 2009 Kitware, Inc.
+# Copyright 2006 Tristan Carel
+# 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.
+#=============================================================================
+
+#============================================================
+# PERPLEX_TARGET (public macro)
+#============================================================
+
+include(CMakeParseArguments)
+
+if(NOT COMMAND PERPLEX_TARGET)
+ macro(PERPLEX_TARGET Name Input)
+ get_filename_component(IN_FILE_WE ${Input} NAME_WE)
+ set(PVAR_PREFIX ${Name}_${IN_FILE_WE})
+
+ if (TARGET perplex_stage)
+ set(DEP_TARGET perplex_stage)
+ endif (TARGET perplex_stage)
+
+ if(${ARGC} GREATER 3)
+ CMAKE_PARSE_ARGUMENTS(${PVAR_PREFIX} ""
"TEMPLATE;OUT_SRC_FILE;OUT_HDR_FILE;WORKING_DIR" "" ${ARGN})
+ endif(${ARGC} GREATER 3)
+
+ # Need a working directory
+ if("${${PVAR_PREFIX}_WORKING_DIR}" STREQUAL "")
+ set(${PVAR_PREFIX}_WORKING_DIR
"${CMAKE_CURRENT_BINARY_DIR}/${PVAR_PREFIX}")
+ endif("${${PVAR_PREFIX}_WORKING_DIR}" STREQUAL "")
+ file(MAKE_DIRECTORY ${${PVAR_PREFIX}_WORKING_DIR})
+
+ # Set up intermediate and final output names
+
+ # Output source file
+ if ("${${PVAR_PREFIX}_OUT_SRC_FILE}" STREQUAL "")
+ set(${PVAR_PREFIX}_OUT_SRC_FILE
${${PVAR_PREFIX}_WORKING_DIR}/${IN_FILE_WE}.c)
+ else ("${${PVAR_PREFIX}_OUT_SRC_FILE}" STREQUAL "")
+ get_filename_component(specified_out_dir ${${PVAR_PREFIX}_OUT_SRC_FILE}
PATH)
+ if(NOT "${specified_out_dir}" STREQUAL "")
+ message(FATAL_ERROR "\nFull path specified for OUT_SRC_FILE - should be
filename only.\n")
+ endif(NOT "${specified_out_dir}" STREQUAL "")
+ set(${PVAR_PREFIX}_OUT_SRC_FILE
${${PVAR_PREFIX}_WORKING_DIR}/${${PVAR_PREFIX}_OUT_SRC_FILE})
+ endif ("${${PVAR_PREFIX}_OUT_SRC_FILE}" STREQUAL "")
+
+ # Output header file
+ if ("${${PVAR_PREFIX}_OUT_HDR_FILE}" STREQUAL "")
+ set(${PVAR_PREFIX}_OUT_HDR_FILE
${${PVAR_PREFIX}_WORKING_DIR}/${IN_FILE_WE}.h)
+ else ("${${PVAR_PREFIX}_OUT_HDR_FILE}" STREQUAL "")
+ get_filename_component(specified_out_dir ${${PVAR_PREFIX}_OUT_HDR_FILE}
PATH)
+ if(NOT "${specified_out_dir}" STREQUAL "")
+ message(FATAL_ERROR "\nFull path specified for OUT_HDR_FILE - should be
filename only.\n")
+ endif(NOT "${specified_out_dir}" STREQUAL "")
+ set(${PVAR_PREFIX}_OUT_HDR_FILE
${${PVAR_PREFIX}_WORKING_DIR}/${${PVAR_PREFIX}_OUT_HDR_FILE})
+ endif ("${${PVAR_PREFIX}_OUT_HDR_FILE}" STREQUAL "")
+
+ # input file
+ get_filename_component(in_full ${Input} ABSOLUTE)
+ if("${in_full}" STREQUAL "${Input}")
+ set(perplex_in_file ${Input})
+ else("${in_full}" STREQUAL "${Input}")
+ set(perplex_in_file "${CMAKE_CURRENT_SOURCE_DIR}/${Input}")
+ endif("${in_full}" STREQUAL "${Input}")
+
+ # Intermediate file
+ set(re2c_src "${${PVAR_PREFIX}_WORKING_DIR}/${IN_FILE_WE}.re")
+
+ # Make sure we have a template
+ if ("${${PVAR_PREFIX}_TEMPLATE}" STREQUAL "")
+ if(PERPLEX_TEMPLATE)
+ set(${PVAR_PREFIX}_TEMPLATE ${PERPLEX_TEMPLATE})
+ else(PERPLEX_TEMPLATE)
+ message(FATAL_ERROR "\nNo Perplex template file specified - please
specify the file using the PERPLEX_TEMPLATE variable:\ncmake ..
-DPERPLEX_TEMPLATE=/path/to/template_file.c\n")
+ endif(PERPLEX_TEMPLATE)
+ endif ("${${PVAR_PREFIX}_TEMPLATE}" STREQUAL "")
+
+ get_filename_component(IN_FILE ${Input} NAME)
+ add_custom_command(
+ OUTPUT ${re2c_src} ${${PVAR_PREFIX}_OUT_HDR_FILE}
${${PVAR_PREFIX}_WORKING_DIR}/${IN_FILE}
+ COMMAND ${CMAKE_COMMAND} -E copy ${perplex_in_file}
${${PVAR_PREFIX}_WORKING_DIR}/${IN_FILE}
+ COMMAND ${PERPLEX_EXECUTABLE} -c -o ${re2c_src} -i
${${PVAR_PREFIX}_OUT_HDR_FILE} -t ${${PVAR_PREFIX}_TEMPLATE}
${${PVAR_PREFIX}_WORKING_DIR}/${IN_FILE}
+ DEPENDS ${Input} ${PERPLEX_EXECUTABLE_TARGET} ${RE2C_EXECUTABLE_TARGET}
${DEP_TARGET}
+ WORKING_DIRECTORY ${${PVAR_PREFIX}_WORKING_DIR}
+ COMMENT "[PERPLEX][${Name}] Generating re2c input with
${PERPLEX_EXECUTABLE}"
+ )
+
+ if(NOT DEBUGGING_GENERATED_SOURCES)
+ add_custom_command(
+ OUTPUT ${${PVAR_PREFIX}_OUT_SRC_FILE}
+ COMMAND ${RE2C_EXECUTABLE} --no-debug-info --no-generation-date -c -o
${${PVAR_PREFIX}_OUT_SRC_FILE} ${re2c_src}
+ DEPENDS ${Input} ${re2c_src} ${${PVAR_PREFIX}_OUT_HDR_FILE}
${PERPLEX_EXECUTABLE_TARGET} ${RE2C_EXECUTABLE_TARGET} ${DEP_TARGET}
+ WORKING_DIRECTORY ${${PVAR_PREFIX}_WORKING_DIR}
+ COMMENT "[RE2C][${Name}] Building scanner with ${RE2C_EXECUTABLE}"
+ )
+ else(NOT DEBUGGING_GENERATED_SOURCES)
+ add_custom_command(
+ OUTPUT ${${PVAR_PREFIX}_OUT_SRC_FILE}
+ COMMAND ${RE2C_EXECUTABLE} --no-generation-date -c -o
${${PVAR_PREFIX}_OUT_SRC_FILE} ${re2c_src}
+ DEPENDS ${Input} ${re2c_src} ${${PVAR_PREFIX}_OUT_HDR_FILE}
${PERPLEX_EXECUTABLE_TARGET} ${RE2C_EXECUTABLE_TARGET} ${DEP_TARGET}
+ WORKING_DIRECTORY ${${PVAR_PREFIX}_WORKING_DIR}
+ COMMENT "[RE2C][${Name}] Building scanner with ${RE2C_EXECUTABLE}"
+ )
+ endif(NOT DEBUGGING_GENERATED_SOURCES)
+
+ set(PERPLEX_${Name}_DEFINED TRUE)
+ set(PERPLEX_${Name}_SRC ${${PVAR_PREFIX}_OUT_SRC_FILE})
+ set(PERPLEX_${Name}_HDR ${${PVAR_PREFIX}_OUT_HDR_FILE})
+ set(PERPLEX_${Name}_INCLUDE_DIR ${${PVAR_PREFIX}_WORKING_DIR})
+ endmacro(PERPLEX_TARGET)
+endif(NOT COMMAND PERPLEX_TARGET)
+
+#============================================================
+# ADD_PERPLEX_LEMON_DEPENDENCY (public macro)
+#============================================================
+if(NOT COMMAND ADD_PERPLEX_LEMON_DEPENDENCY)
+ macro(ADD_PERPLEX_LEMON_DEPENDENCY PERPLEXTarget LemonTarget)
+
+ if(NOT PERPLEX_${PERPLEXTarget}_SRC)
+ message(SEND_ERROR "PERPLEX target `${PERPLEXTarget}' does not exists.")
+ endif()
+
+ if(NOT LEMON_${LemonTarget}_HDR)
+ message(SEND_ERROR "Lemon target `${LemonTarget}' does not exists.")
+ endif()
+
+ set_source_files_properties(${PERPLEX_${PERPLEXTarget}_SRC}
+ PROPERTIES OBJECT_DEPENDS ${LEMON_${LemonTarget}_HDR})
+ endmacro(ADD_PERPLEX_LEMON_DEPENDENCY)
+endif(NOT COMMAND ADD_PERPLEX_LEMON_DEPENDENCY)
+
+#============================================================
+# FindPERPLEX.cmake ends here
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
Property changes on:
brlcad/branches/extbuild/src/other/ext/CMake/FindPERPLEX.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/extbuild/src/other/ext/CMake/FindPOLY2TRI.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindPOLY2TRI.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindPOLY2TRI.cmake
2020-10-23 02:45:31 UTC (rev 77582)
@@ -0,0 +1,102 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindPOLY2TRI
+--------
+
+Find the native POLY2TRI includes and library.
+
+IMPORTED Targets
+^^^^^^^^^^^^^^^^
+
+This module defines :prop_tgt:`IMPORTED` target ``POLY2TRI::POLY2TRI``, if
+POLY2TRI has been found.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+::
+
+ POLY2TRI_INCLUDE_DIRS - where to find poly2tri/poly2tri.h, etc.
+ POLY2TRI_LIBRARIES - List of libraries when using poly2tri.
+ POLY2TRI_FOUND - True if poly2tri found.
+
+Hints
+^^^^^
+
+A user may set ``POLY2TRI_ROOT`` to a poly2tri installation root to tell this
+module where to look.
+#]=======================================================================]
+
+set(_POLY2TRI_SEARCHES)
+
+# Search POLY2TRI_ROOT first if it is set.
+if(POLY2TRI_ROOT)
+ set(_POLY2TRI_SEARCH_ROOT PATHS ${POLY2TRI_ROOT} NO_DEFAULT_PATH)
+ list(APPEND _POLY2TRI_SEARCHES _POLY2TRI_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_POLY2TRI_x86 "(x86)")
+set(_POLY2TRI_SEARCH_NORMAL
+ PATHS "$ENV{ProgramFiles}/poly2tri"
+ "$ENV{ProgramFiles${_POLY2TRI_x86}}/poly2tri")
+unset(_POLY2TRI_x86)
+list(APPEND _POLY2TRI_SEARCHES _POLY2TRI_SEARCH_NORMAL)
+
+set(POLY2TRI_NAMES poly2tri)
+
+# Try each search configuration.
+foreach(search ${_POLY2TRI_SEARCHES})
+ find_path(POLY2TRI_INCLUDE_DIR NAMES poly2tri/poly2tri.h ${${search}}
PATH_SUFFIXES include include/poly2tri poly2tri)
+endforeach()
+
+# Allow POLY2TRI_LIBRARY to be set manually, as the location of the poly2tri
library
+if(NOT POLY2TRI_LIBRARY)
+ foreach(search ${_POLY2TRI_SEARCHES})
+ find_library(POLY2TRI_LIBRARY NAMES ${POLY2TRI_NAMES} NAMES_PER_DIR
${${search}} PATH_SUFFIXES lib)
+ endforeach()
+endif()
+
+unset(POLY2TRI_NAMES)
+
+mark_as_advanced(POLY2TRI_INCLUDE_DIR)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(POLY2TRI REQUIRED_VARS POLY2TRI_LIBRARY
POLY2TRI_INCLUDE_DIR)
+
+if(POLY2TRI_FOUND)
+ set(POLY2TRI_INCLUDE_DIRS ${POLY2TRI_INCLUDE_DIR})
+
+ if(NOT POLY2TRI_LIBRARIES)
+ set(POLY2TRI_LIBRARIES ${POLY2TRI_LIBRARY})
+ endif()
+
+ if(NOT TARGET POLY2TRI::POLY2TRI)
+ add_library(POLY2TRI::POLY2TRI UNKNOWN IMPORTED)
+ set_target_properties(POLY2TRI::POLY2TRI PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${POLY2TRI_INCLUDE_DIRS}")
+
+ if(POLY2TRI_LIBRARY_RELEASE)
+ set_property(TARGET POLY2TRI::POLY2TRI APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(POLY2TRI::POLY2TRI PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${POLY2TRI_LIBRARY_RELEASE}")
+ endif()
+
+ if(POLY2TRI_LIBRARY_DEBUG)
+ set_property(TARGET POLY2TRI::POLY2TRI APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(POLY2TRI::POLY2TRI PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${POLY2TRI_LIBRARY_DEBUG}")
+ endif()
+
+ if(NOT POLY2TRI_LIBRARY_RELEASE AND NOT POLY2TRI_LIBRARY_DEBUG)
+ set_property(TARGET POLY2TRI::POLY2TRI APPEND PROPERTY
+ IMPORTED_LOCATION "${POLY2TRI_LIBRARY}")
+ endif()
+ endif()
+endif()
Property changes on:
brlcad/branches/extbuild/src/other/ext/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/extbuild/src/other/ext/CMake/FindPROJ4.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindPROJ4.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindPROJ4.cmake
2020-10-23 02:45:31 UTC (rev 77582)
@@ -0,0 +1,72 @@
+###############################################################################
+# 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.
+#
+###############################################################################
+
+set(_PROJ4_SEARCHES)
+
+# Search PROJ4_ROOT first if it is set.
+if(PROJ4_ROOT)
+ set(_PROJ4_SEARCH_ROOT PATHS ${PROJ4_ROOT} NO_DEFAULT_PATH)
+ list(APPEND _PROJ4_SEARCHES _PROJ4_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_PROJ4_x86 "(x86)")
+set(_PROJ4_SEARCH_NORMAL
+ PATHS
+ "$ENV{OSGEO4W_HOME}"
+ "C:/OSGeo4W"
+ "$ENV{ProgramFiles}/proj4"
+ "$ENV{ProgramFiles${_PROJ4_x86}}/proj4"
+ )
+ unset(_PROJ4_x86)
+list(APPEND _PROJ4_SEARCHES _PROJ4_SEARCH_NORMAL)
+
+# Try each search configuration.
+foreach(search ${_PROJ4_SEARCHES})
+ find_path(PROJ4_INCLUDE_DIR NAMES proj_api.h ${${search}} PATH_SUFFIXES
include include/proj4 proj4 include/proj proj)
+endforeach()
+
+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)
+if(NOT PROJ4_LIBRARY)
+ foreach(search ${_PROJ4_SEARCHES})
+ find_library(PROJ4_LIBRARY NAMES ${PROJ4_NAMES} NAMES_PER_DIR
${${search}} PATH_SUFFIXES lib)
+ endforeach()
+endif()
+unset(PROJ4_NAMES)
+
+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/extbuild/src/other/ext/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/extbuild/src/other/ext/CMake/FindRE2C.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindRE2C.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindRE2C.cmake 2020-10-23
02:45:31 UTC (rev 77582)
@@ -0,0 +1,167 @@
+# The module defines the following variables:
+# RE2C_EXECUTABLE - the path to the re2c executable
+#
+#=============================================================================
+
+set(_RE2C_SEARCHES)
+
+# Search RE2C_ROOT first if it is set.
+if(RE2C_ROOT)
+ set(_RE2C_SEARCH_ROOT PATHS ${RE2C_ROOT} NO_DEFAULT_PATH)
+ list(APPEND _RE2C_SEARCHES _RE2C_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_RE2C_x86 "(x86)")
+set(_RE2C_SEARCH_NORMAL
+ PATHS "$ENV{ProgramFiles}/re2c"
+ "$ENV{ProgramFiles${_RE2C_x86}}/re2c")
+unset(_RE2C_x86)
+list(APPEND _RE2C_SEARCHES _RE2C_SEARCH_NORMAL)
+
+set(RE2C_NAMES re2c)
+
+# Try each search configuration.
+foreach(search ${_RE2C_SEARCHES})
+ find_program(RE2C_EXECUTABLE re2c ${${search}} PATH_SUFFIXES bin)
+endforeach()
+
+mark_as_advanced(RE2C_EXECUTABLE)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(RE2C DEFAULT_MSG RE2C_EXECUTABLE)
+
+# Provide a macro to generate custom build rules:
+
+# RE2C_TARGET(Name RE2CInput RE2COutput [COMPILE_FLAGS <string>])
+# which creates a custom command to generate the <RE2COutput> file from
+# the <RE2CInput> file. If COMPILE_FLAGS option is specified, the next
+# parameter is added to the re2c command line. Name is an alias used to
+# get details of this custom command.
+
+# This module also defines a macro:
+# ADD_RE2C_LEMON_DEPENDENCY(RE2CTarget LemonTarget)
+# which adds the required dependency between a scanner and a parser
+# where <RE2CTarget> and <LemonTarget> are the first parameters of
+# respectively RE2C_TARGET and LEMON_TARGET macros.
+#
+# ====================================================================
+# Example:
+#
+# find_package(LEMON)
+# find_package(RE2C)
+#
+# LEMON_TARGET(MyParser parser.y "${CMAKE_CURRENT_BINARY_DIR}/parser.cpp")
+# RE2C_TARGET(MyScanner scanner.re
"${CMAKE_CURRENT_BINARY_DIR}/scanner.cpp")
+# ADD_RE2C_LEMON_DEPENDENCY(MyScanner MyParser)
+#
+# include_directories("${CMAKE_CURRENT_BINARY_DIR}")
+# add_executable(Foo
+# Foo.cc
+# ${LEMON_MyParser_OUTPUTS}
+# ${RE2C_MyScanner_OUTPUTS}
+# )
+# ====================================================================
+#
+#=============================================================================
+# Copyright (c) 2010-2020 United States Government as represented by
+# the U.S. Army Research Laboratory.
+# Copyright 2009 Kitware, Inc.
+# Copyright 2006 Tristan Carel
+# 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.
+#=============================================================================
+
+#============================================================
+# RE2C_TARGET (public macro)
+#============================================================
+#
+# TODO - rework this macro to make use of CMakeParseArguments, see
+# http://www.cmake.org/pipermail/cmake/2012-July/051309.html
+if(NOT COMMAND RE2C_TARGET)
+ macro(RE2C_TARGET Name Input Output)
+ set(RE2C_TARGET_usage "RE2C_TARGET(<Name> <Input> <Output> [COMPILE_FLAGS
<string>]")
+ if(${ARGC} GREATER 3)
+ if(${ARGC} EQUAL 5)
+ if("${ARGV3}" STREQUAL "COMPILE_FLAGS")
+ set(RE2C_EXECUTABLE_opts "${ARGV4}")
+ SEPARATE_ARGUMENTS(RE2C_EXECUTABLE_opts)
+ else()
+ message(SEND_ERROR ${RE2C_TARGET_usage})
+ endif()
+ else()
+ message(SEND_ERROR ${RE2C_TARGET_usage})
+ endif()
+ endif()
+
+ add_custom_command(OUTPUT ${Output}
+ COMMAND ${RE2C_EXECUTABLE}
+ ARGS ${RE2C_EXECUTABLE_opts} -o${Output} ${Input}
+ DEPENDS ${Input} ${RE2C_EXECUTABLE_TARGET}
+ COMMENT "[RE2C][${Name}] Building scanner with ${RE2C_EXECUTABLE}"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
+
+ set(RE2C_${Name}_DEFINED TRUE)
+ set(RE2C_${Name}_OUTPUTS ${Output})
+ set(RE2C_${Name}_INPUT ${Input})
+ set(RE2C_${Name}_COMPILE_FLAGS ${RE2C_EXECUTABLE_opts})
+ set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
"${Output}")
+ endmacro(RE2C_TARGET)
+endif(NOT COMMAND RE2C_TARGET)
+#============================================================
+
+#============================================================
+# ADD_RE2C_LEMON_DEPENDENCY (public macro)
+#============================================================
+#
+if(NOT COMMAND ADD_RE2C_LEMON_DEPENDENCY)
+ macro(ADD_RE2C_LEMON_DEPENDENCY RE2CTarget LemonTarget)
+
+ if(NOT RE2C_${RE2CTarget}_OUTPUTS)
+ message(SEND_ERROR "RE2C target `${RE2CTarget}' does not exists.")
+ endif()
+
+ if(NOT LEMON_${LemonTarget}_HDR)
+ message(SEND_ERROR "Lemon target `${LemonTarget}' does not exists.")
+ endif()
+
+ set_source_files_properties(${RE2C_${RE2CTarget}_OUTPUTS}
+ PROPERTIES OBJECT_DEPENDS ${LEMON_${LemonTarget}_HDR})
+ endmacro(ADD_RE2C_LEMON_DEPENDENCY)
+endif(NOT COMMAND ADD_RE2C_LEMON_DEPENDENCY)
+#============================================================
+
+# RE2C_Util.cmake ends here
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
Property changes on: brlcad/branches/extbuild/src/other/ext/CMake/FindRE2C.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/extbuild/src/other/ext/CMake/FindREGEX.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindREGEX.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindREGEX.cmake
2020-10-23 02:45:31 UTC (rev 77582)
@@ -0,0 +1,75 @@
+# F I N D R E G E X . C M A K E
+# BRL-CAD
+#
+# Copyright (c) 2011-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 regex
+# Find the native REGEX includes and library
+#
+# REGEX_INCLUDE_DIRS - where to find regex.h, etc.
+# REGEX_LIBRARIES - List of libraries when using regex.
+# REGEX_FOUND - True if regex found.
+#
+#=============================================================================
+
+# Because at least one specific framework (Ruby) on OSX has been observed
+# to include its own regex.h copy, check frameworks last - /usr/include
+# is preferred to a package-specific copy for a generic regex search
+set(CMAKE_FIND_FRAMEWORK LAST)
+find_path(REGEX_INCLUDE_DIRS regex.h)
+
+set(REGEX_NAMES c regex compat)
+foreach(rname ${REGEX_NAMES})
+ if(NOT REGEX_LIBRARY)
+ include(CheckLibraryExists)
+ check_library_exists(${rname} regcomp "" HAVE_REGEX_LIB)
+ if(HAVE_REGEX_LIB)
+ find_library(REGEX_LIBRARIES NAMES ${rname})
+ endif(HAVE_REGEX_LIB)
+ endif(NOT REGEX_LIBRARY)
+endforeach(rname ${REGEX_NAMES})
+
+mark_as_advanced(REGEX_LIBRARY REGEX_INCLUDE_DIR)
+
+# handle the QUIETLY and REQUIRED arguments and set REGEX_FOUND to TRUE if
+# all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(REGEX DEFAULT_MSG REGEX_INCLUDE_DIRS
REGEX_LIBRARIES)
+
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
Property changes on:
brlcad/branches/extbuild/src/other/ext/CMake/FindREGEX.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/extbuild/src/other/ext/CMake/FindSTEPCODE.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindSTEPCODE.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindSTEPCODE.cmake
2020-10-23 02:45:31 UTC (rev 77582)
@@ -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/extbuild/src/other/ext/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
Added: brlcad/branches/extbuild/src/other/ext/CMake/FindTCL.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindTCL.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindTCL.cmake 2020-10-23
02:45:31 UTC (rev 77582)
@@ -0,0 +1,450 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindTCL
+-------
+
+This module finds if Tcl 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:
+
+::
+
+TCL_FOUND = Tcl was found
+TK_FOUND = Tk was found
+TCLTK_FOUND = Tcl and Tk were found
+TCLSH_FOUND = TRUE if tclsh has been found
+TCL_LIBRARY = path to Tcl library (tcl tcl80)
+TCL_INCLUDE_PATH = path to where tcl.h can be found
+TCL_TCLSH = path to tclsh binary (tcl tcl80)
+TK_LIBRARY = path to Tk library (tk tk80 etc)
+TK_INCLUDE_PATH = path to where tk.h can be found
+TK_WISH = full path to the wish executable
+TCL_STUB_LIBRARY = path to Tcl stub library
+TK_STUB_LIBRARY = path to Tk stub library
+TTK_STUB_LIBRARY = path to ttk stub library
+
+#]=======================================================================]
+
+include(CMakeFindFrameworks)
+
+set(_TCL_SEARCHES)
+
+# Search TCL_ROOT first if it is set.
+if(TCL_ROOT)
+ set(_TCL_SEARCH_ROOT PATHS ${TCL_ROOT} NO_DEFAULT_PATH)
+ list(APPEND _TCL_SEARCHES _TCL_SEARCH_ROOT)
+endif()
+
+if(WIN32)
+ get_filename_component(
+ ActiveTcl_CurrentVersion
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]"
+ 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"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/bin"
+ "[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}
+
"[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"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/lib"
+ "$ENV{ProgramFiles}/Tcl/Lib"
+ "C:/Program Files/Tcl/lib"
+ "C:/Tcl/lib"
+ )
+
+ 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"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/include"
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/include"
+ "$ENV{ProgramFiles}/Tcl/include"
+ "C:/Program Files/Tcl/include"
+ "C:/Tcl/include"
+ )
+endif()
+
+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
+ )
+if(CYGWIN)
+ set(TCL_TCLSH_NAMES ${TCL_TCLSH_NAMES} cygtclsh83 cygtclsh80)
+endif(CYGWIN)
+
+foreach(search ${_TCL_SEARCHES})
+ find_program(TCL_TCLSH NAMES ${TCL_TCLSH_NAMES} ${${search}} PATH_SUFFIXES
bin)
+endforeach()
+if (NOT TCL_TCLSH)
+ find_program(TCL_TCLSH NAMES ${TCL_TCLSH_NAMES} HINTS
${TCLTK_POSSIBLE_BIN_PATHS})
+endif (NOT TCL_TCLSH)
+
+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
+ )
+
+if(CYGWIN)
+ 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)
+
+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}")
+endif()
+
+set(TCLTK_POSSIBLE_LIB_PATHS
+ "${TCL_INCLUDE_PATH_PARENT}/lib"
+ "${TK_INCLUDE_PATH_PARENT}/lib"
+ "${TCL_LIBRARY_PATH}"
+ "${TK_LIBRARY_PATH}"
+ "${TCL_TCLSH_PATH_PARENT}/lib"
+ "${TK_WISH_PATH_PARENT}/lib"
+ )
+set(TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
+ lib
+ lib/tcl
+ lib/tcl/tcl8.7
+ lib/tcl/tk8.7
+ lib/tcl/tcl8.6
+ lib/tcl/tk8.6
+ lib/tcl/tcl8.5
+ lib/tcl/tk8.5
+ lib/tcl/tcl8.4
+ lib/tcl/tk8.4
+ )
+
+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
+ NAMES ${TCL_POSSIBLE_LIB_NAMES}
+ NAMES_PER_DIR ${${search}}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES})
+ endforeach()
+endif()
+if(NOT 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
+ 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
+ )
+if(NOT TCL_STUB_LIBRARY)
+ foreach(search ${_TCL_SEARCHES})
+ find_library(TCL_STUB_LIBRARY
+ NAMES ${TCLSTUB_POSSIBLE_LIB_NAMES}
+ 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}
+ )
+endif()
+
+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
+ )
+
+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}
+ )
+ endforeach()
+endif()
+if(NOT 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
+ 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
+ )
+
+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}
+ )
+ endforeach()
+endif()
+if(NOT TK_STUB_LIBRARY)
+ find_library(TK_STUB_LIBRARY
+ NAMES ${TK_STUB_POSSIBLE_LIB_NAMES}
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ )
+endif()
+
+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
+ )
+
+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}
+ )
+ endforeach()
+endif()
+if(NOT TTK_STUB_LIBRARY)
+ find_library(TTK_STUB_LIBRARY
+ NAMES ${TTK_STUB_POSSIBLE_LIB_NAMES}
+ PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ )
+endif()
+
+CMAKE_FIND_FRAMEWORKS(Tcl)
+CMAKE_FIND_FRAMEWORKS(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()
+
+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()
+
+set(TCLTK_POSSIBLE_INCLUDE_PATHS
+ "${TCL_LIBRARY_PATH_PARENT}/include"
+ "${TK_LIBRARY_PATH_PARENT}/include"
+ "${TCL_INCLUDE_PATH}"
+ "${TK_INCLUDE_PATH}"
+ ${TCL_FRAMEWORK_INCLUDES}
+ ${TK_FRAMEWORK_INCLUDES}
+ "${TCL_TCLSH_PATH_PARENT}/include"
+ "${TK_WISH_PATH_PARENT}/include"
+ )
+
+set(TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
+ include/tcl${TK_LIBRARY_VERSION}
+ include/tcl${TCL_LIBRARY_VERSION}
+ include/tcl8.7
+ include/tk8.7
+ include/tcl8.6
+ include/tk8.6
+ include/tcl8.5
+ include/tk8.5
+ include/tcl8.4
+ include/tk8.4
+ include/tcl8.3
+ include/tcl8.2
+ include/tcl8.0
+ )
+
+foreach(search ${_TCL_SEARCHES})
+ 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
+ NAMES tcl.h
+ HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
+ )
+endif()
+foreach(search ${_TCL_SEARCHES})
+ 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
+ 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 "
+ 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")
+ file(READ "${CMAKE_BINARY_DIR}/CMakeTmp/TK_WINDOWINGSYSTEM" readresultvar)
+ string(REGEX REPLACE "\n" "" WSYS "${readresultvar}")
+ 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}")
+ unset(TCL_LIBRARY CACHE)
+ unset(TCL_STUB_LIBRARY CACHE)
+ unset(TK_LIBRARY CACHE)
+ unset(TK_STUB_LIBRARY CACHE)
+ unset(TCL_FOUND CACHE)
+ unset(TK_FOUND CACHE)
+ unset(TCLTK_FOUND CACHE)
+ unset(TCLSH_FOUND CACHE)
+ unset(TCL_LIBRARY CACHE)
+ unset(TCL_INCLUDE_PATH CACHE)
+ unset(TCL_TCLSH CACHE)
+ unset(TK_LIBRARY CACHE)
+ unset(TK_INCLUDE_PATH CACHE)
+ unset(TK_WISH CACHE)
+ 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}")
+
+include(FindPackageHandleStandardArgs)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL
+ REQUIRED_VARS TCL_LIBRARY TCL_STUB_LIBRARY TCL_INCLUDE_PATH TCL_TCLSH
+ VERSION_VAR TCLSH_VERSION_STRING)
+set(FPHSA_NAME_MISMATCHED 1)
+set(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED})
+set(TCLTK_FIND_QUIETLY ${TCL_FIND_QUIETLY})
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCLTK
+ REQUIRED_VARS TCL_LIBRARY TCL_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)
+unset(FPHSA_NAME_MISMATCHED)
+
+mark_as_advanced(
+ TCL_INCLUDE_PATH
+ TCL_LIBRARY
+ TCL_STUB_LIBRARY
+ TCL_TCLSH
+ TK_INCLUDE_PATH
+ TK_LIBRARY
+ TK_STUB_LIBRARY
+ TK_WISH
+ TTK_STUB_LIBRARY
+ )
+
+
+# Local Variables:
+# tab-width: 8
+# mode: cmake
+# indent-tabs-mode: t
+# End:
+# ex: shiftwidth=2 tabstop=8
Property changes on: brlcad/branches/extbuild/src/other/ext/CMake/FindTCL.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/extbuild/src/other/ext/CMake/FindUTAHRLE.cmake
===================================================================
--- brlcad/branches/extbuild/src/other/ext/CMake/FindUTAHRLE.cmake
(rev 0)
+++ brlcad/branches/extbuild/src/other/ext/CMake/FindUTAHRLE.cmake
2020-10-23 02:45:31 UTC (rev 77582)
@@ -0,0 +1,102 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindUTAHRLE
+--------
+
+Find the native UTAHRLE includes and library.
+
+IMPORTED Targets
+^^^^^^^^^^^^^^^^
+
+This module defines :prop_tgt:`IMPORTED` target ``UTAHRLE::UTAHRLE``, if
+UTAHRLE has been found.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This module defines the following variables:
+
+::
+
+ UTAHRLE_INCLUDE_DIRS - where to find pam.h, etc.
+ UTAHRLE_LIBRARIES - List of libraries when using utahrle.
+ UTAHRLE_FOUND - True if utahrle found.
+
+Hints
+^^^^^
+
+A user may set ``UTAHRLE_ROOT`` to a utahrle installation root to tell this
+module where to look.
+#]=======================================================================]
+
+set(_UTAHRLE_SEARCHES)
+
+# Search UTAHRLE_ROOT first if it is set.
+if(UTAHRLE_ROOT)
+ set(_UTAHRLE_SEARCH_ROOT PATHS ${UTAHRLE_ROOT} NO_DEFAULT_PATH)
+ list(APPEND _UTAHRLE_SEARCHES _UTAHRLE_SEARCH_ROOT)
+endif()
+
+# Normal search.
+set(_UTAHRLE_x86 "(x86)")
+set(_UTAHRLE_SEARCH_NORMAL
+ PATHS "$ENV{ProgramFiles}/utahrle"
+ "$ENV{ProgramFiles${_UTAHRLE_x86}}/utahrle")
+unset(_UTAHRLE_x86)
+list(APPEND _UTAHRLE_SEARCHES _UTAHRLE_SEARCH_NORMAL)
+
+set(UTAHRLE_NAMES utahrle)
+
+# Try each search configuration.
+foreach(search ${_UTAHRLE_SEARCHES})
+ find_path(UTAHRLE_INCLUDE_DIR NAMES rle.h ${${search}} PATH_SUFFIXES include
include/utahrle)
+endforeach()
+
+# Allow UTAHRLE_LIBRARY to be set manually, as the location of the utahrle
library
+if(NOT UTAHRLE_LIBRARY)
+ foreach(search ${_UTAHRLE_SEARCHES})
+ find_library(UTAHRLE_LIBRARY NAMES ${UTAHRLE_NAMES} NAMES_PER_DIR
${${search}} PATH_SUFFIXES lib)
+ endforeach()
+endif()
+
+unset(UTAHRLE_NAMES)
+
+mark_as_advanced(UTAHRLE_INCLUDE_DIR)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(UTAHRLE REQUIRED_VARS UTAHRLE_LIBRARY
UTAHRLE_INCLUDE_DIR)
+
+if(UTAHRLE_FOUND)
+ set(UTAHRLE_INCLUDE_DIRS ${UTAHRLE_INCLUDE_DIR})
+
+ if(NOT UTAHRLE_LIBRARIES)
+ set(UTAHRLE_LIBRARIES ${UTAHRLE_LIBRARY})
+ endif()
+
+ if(NOT TARGET UTAHRLE::UTAHRLE)
+ add_library(UTAHRLE::UTAHRLE UNKNOWN IMPORTED)
+ set_target_properties(UTAHRLE::UTAHRLE PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${UTAHRLE_INCLUDE_DIRS}")
+
+ if(UTAHRLE_LIBRARY_RELEASE)
+ set_property(TARGET UTAHRLE::UTAHRLE APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(UTAHRLE::UTAHRLE PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${UTAHRLE_LIBRARY_RELEASE}")
+ endif()
+
+ if(UTAHRLE_LIBRARY_DEBUG)
+ set_property(TARGET UTAHRLE::UTAHRLE APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(UTAHRLE::UTAHRLE PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${UTAHRLE_LIBRARY_DEBUG}")
+ endif()
+
+ if(NOT UTAHRLE_LIBRARY_RELEASE AND NOT UTAHRLE_LIBRARY_DEBUG)
+ set_property(TARGET UTAHRLE::UTAHRLE APPEND PROPERTY
+ IMPORTED_LOCATION "${UTAHRLE_LIBRARY}")
+ endif()
+ endif()
+endif()
Property changes on:
brlcad/branches/extbuild/src/other/ext/CMake/FindUTAHRLE.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