Revision: 77335
http://sourceforge.net/p/brlcad/code/77335
Author: starseeker
Date: 2020-10-05 17:16:38 +0000 (Mon, 05 Oct 2020)
Log Message:
-----------
Checkpoint work on an approach that incorporates the superbuild builds into the
configure step, rather than the build step. Has the considerable advantage of
allowing us to keep most of the BRL-CAD build logic intact, but shifts most of
the build time for third party deps into configure.
Modified Paths:
--------------
brlcad/branches/thirdparty_rework/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/libgcv/plugins/obj/wfobj/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/bson.cmake
brlcad/branches/thirdparty_rework/src/superbuild/gdal.cmake
brlcad/branches/thirdparty_rework/src/superbuild/itcl.cmake
brlcad/branches/thirdparty_rework/src/superbuild/itk.cmake
brlcad/branches/thirdparty_rework/src/superbuild/iwidgets.cmake
brlcad/branches/thirdparty_rework/src/superbuild/netpbm.cmake
brlcad/branches/thirdparty_rework/src/superbuild/openscenegraph/CMakeModules/OsgCPack.cmake
brlcad/branches/thirdparty_rework/src/superbuild/png.cmake
brlcad/branches/thirdparty_rework/src/superbuild/proj4.cmake
brlcad/branches/thirdparty_rework/src/superbuild/regex.cmake
brlcad/branches/thirdparty_rework/src/superbuild/stepcode.cmake
brlcad/branches/thirdparty_rework/src/superbuild/tcl.cmake
brlcad/branches/thirdparty_rework/src/superbuild/tk.cmake
brlcad/branches/thirdparty_rework/src/superbuild/utahrle.cmake
brlcad/branches/thirdparty_rework/src/superbuild/zlib.cmake
Added Paths:
-----------
brlcad/branches/thirdparty_rework/src/superbuild/CMake/
brlcad/branches/thirdparty_rework/src/superbuild/CMake/ExternalProject_Target.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindADAPTAGRAMS.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindASTYLE.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindAppleseed.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindBSON.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindBlosc.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindFontconfig.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindGECODE.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindGL.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindIlmBase.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindLEMON.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindNETPBM.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindNSIS.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindOPENNURBS.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindOSL.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindOpenCL.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindOpenVDB.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindPERPLEX.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindPOLY2TRI.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindPROJ4.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindPkgMacros.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindRE2C.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindREGEX.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindSCL.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindSTEPCODE.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindSTL.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindShellDeps.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindTBB.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindTCL.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindUTAHRLE.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindUUID.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindWix.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindX11.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindXMLLINT.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindXSLTPROC.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/Path_Setup.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/RPath_Setup.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/ThirdParty.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/ThirdPartyExecutable.cmake
brlcad/branches/thirdparty_rework/src/superbuild/CMake/buildpath_replace.cxx.in
brlcad/branches/thirdparty_rework/src/superbuild/CMake/rpath_replace.cxx.in
brlcad/branches/thirdparty_rework/src/superbuild/CMake/tcl_replace.cxx.in
brlcad/branches/thirdparty_rework/src/superbuild/perplex/
brlcad/branches/thirdparty_rework/src/superbuild/perplex/CMakeLists.txt
brlcad/branches/thirdparty_rework/src/superbuild/perplex/README.lemon
brlcad/branches/thirdparty_rework/src/superbuild/perplex/README.re2c
brlcad/branches/thirdparty_rework/src/superbuild/perplex/lemon.c
brlcad/branches/thirdparty_rework/src/superbuild/perplex/lempar.c
brlcad/branches/thirdparty_rework/src/superbuild/perplex/perplex/
brlcad/branches/thirdparty_rework/src/superbuild/perplex/perplex/mbo_getopt.cpp
brlcad/branches/thirdparty_rework/src/superbuild/perplex/perplex/mbo_getopt.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/perplex/parser.y
brlcad/branches/thirdparty_rework/src/superbuild/perplex/perplex/perplex.cpp
brlcad/branches/thirdparty_rework/src/superbuild/perplex/perplex/perplex.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/perplex/perplex_template.c
brlcad/branches/thirdparty_rework/src/superbuild/perplex/perplex/scanner.re
brlcad/branches/thirdparty_rework/src/superbuild/perplex/perplex/token_type.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/actions.cc
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/basics.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/bootstrap/
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/code.cc
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/code.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/code_names.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/config.h.in
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/dfa.cc
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/dfa.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/globals.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/ins.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/main.cc
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/mbo_getopt.cc
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/mbo_getopt.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/parser.yy
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/re.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/re2c_parser.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/scanner.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/scanner.re
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/stream_lc.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/substr.cc
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/substr.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/token.h
brlcad/branches/thirdparty_rework/src/superbuild/perplex/re2c/translate.cc
brlcad/branches/thirdparty_rework/src/superbuild/perplex.cmake
Removed Paths:
-------------
brlcad/branches/thirdparty_rework/misc/tools/lemon/
brlcad/branches/thirdparty_rework/misc/tools/lemon.dist
brlcad/branches/thirdparty_rework/misc/tools/perplex/
brlcad/branches/thirdparty_rework/misc/tools/perplex.dist
brlcad/branches/thirdparty_rework/misc/tools/re2c/
brlcad/branches/thirdparty_rework/misc/tools/re2c.dist
brlcad/branches/thirdparty_rework/src/superbuild/tools.cmake
Modified: brlcad/branches/thirdparty_rework/CMakeLists.txt
===================================================================
--- brlcad/branches/thirdparty_rework/CMakeLists.txt 2020-10-05 16:23:00 UTC
(rev 77334)
+++ brlcad/branches/thirdparty_rework/CMakeLists.txt 2020-10-05 17:16:38 UTC
(rev 77335)
@@ -73,24 +73,22 @@
# build.
include(BRLCAD_Util)
-if (NOT DEFINED SUBBUILD)
- #---------------------------------------------------------------------
- # Record the CMake command line arguments (more or less) in
- # CMakeFiles/CMakeOutput.log
- record_cmdline_args()
+#---------------------------------------------------------------------
+# Record the CMake command line arguments (more or less) in
+# CMakeFiles/CMakeOutput.log
+record_cmdline_args()
- #---------------------------------------------------------------------
- # Set up the necessary support for timing of the configuration and
- # build processes
- set_config_time()
- generate_sstamp()
+#---------------------------------------------------------------------
+# Set up the necessary support for timing of the configuration and
+# build processes
+set_config_time()
+generate_sstamp()
- #---------------------------------------------------------------------
- # Mark the time at which the configuration process began.
+#---------------------------------------------------------------------
+# Mark the time at which the configuration process began.
- set(CONFIG_DELTA_START "${CMAKE_BINARY_DIR}/CMakeTmp/CONFIG_DELTA_START")
- execute_process(COMMAND "${CMAKE_BINARY_DIR}/CMakeTmp/sstamp${EXE_EXT}"
"${CONFIG_DELTA_START}")
-endif (NOT DEFINED SUBBUILD)
+set(CONFIG_DELTA_START "${CMAKE_BINARY_DIR}/CMakeTmp/CONFIG_DELTA_START")
+execute_process(COMMAND "${CMAKE_BINARY_DIR}/CMakeTmp/sstamp${EXE_EXT}"
"${CONFIG_DELTA_START}")
#---------------------------------------------------------------------
# Options controlling user level features. These may impact which
@@ -160,90 +158,109 @@
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif(MSVC)
-#---------------------------------------------------------------------
-# We need to build at least some third party components, and maybe a lot of
-# them depending on the options. Now that we know what the high level options
-# are, we know what to do.
+#------------------------------------------------------------------------------
+# We need to build at least some third party components, which are managed in
+# src/other, but many others may optionally use system versions. For the
+# latter cases, we need to conditionally prepare our integrated versions IFF we
+# are not using the system versions and IFF they are required based on the
+# feature settings enabled.
-# If this is the top level control loop, we're going to build everything
-# (including BRL-CAD itself) as external projects of a superbuild. That means
-# every option above will have to be passed to the BRL-CAD subbuild (which will
-# use this same CMakeLists.txt file) along with a -DSUBBUILD=1 option to let
-# the logic know it is time to do the main build.
+# In order to make this work with a minimum of disruption to BRL-CAD's primary
+# build, it is necessary that all required 3rd party dependencies not being
+# managed as part of the main build are prepared and ready *before* we do the
+# work of configuring BRL-CAD itself (beyond the initial determination of
+# feature settings, which is needed to decide whether to enable or disable the
+# 3rd party components in the first place.)
-# This is necessary to ensure the ExternalProject_Add dependencies are fully
-# positioned and ready for the main build - CMake has no practical mechanism to
-# ensure all ExternalProject_Add builds and installs are fully complete before
-# trying to build main target object files, which results in build order chaos
-# and unsuccessful compilations.
-if (NOT DEFINED SUBBUILD)
- message("SUPERBUILD\n")
+# Historically this was done in BRL-CAD by treating ALL 3rd party builds as
+# integrated CMake builds, which offers advantages for packaging, but is
+# practical only when the 3rd party components in question also use CMake for
+# their build systems. If they didn't, BRL-CAD had to produce such a build
+# system. That was viable early on, but only scales to a point - we cannot
+# rewrite many large, complex build systems for many large dependencies.
+# The alternative which allows us to use external build systems directly is the
+# ExternalProject_Add function provided by CMake, but that imposes its own
+# constraints. In particular, the "install" step of the ExternalProject is run
+# independently, not as part of the BRL-CAD install target. Originally this
+# meant that if we wanted to use ExternalProject, we had to have write access
+# to the final install location for the CMAKE_INSTALL_PREFIX during the *build*
+# process - something that can't always be assured. However, since the
+# original solution (writing our own CMake builds) doesn't scale indefinitely,
+# another solution is needed.
- ##########################################################################
- # TODO - revisit this someday, after digesting
- # https://discourse.cmake.org/t/how-to-install-an-external-project/888
- # and related discussions for how best to do all of this.
+# An initial attempt was made to integrate ExternalProject into the main build
+# and manage the build outputs, but while aspects of this worked it proved
+# impossible to produce a reliably ordered build - CMake does not provide the
+# necessary ordering mechanisms to ensure a complete execution of the
+# ExternalProject cycle before starting to build standard object file targets
+# in the primary build. This means that (for example) headers which need to be
+# generated by an ExternalProject to successfully compile object files in the
+# main build may not be there reliably.
- # The most non-standard thing we're doing is undoubtedly using CMake
- # to update rpath settings for non-CMake builds, but otherwise it looks
- # like there is a lot of recent discussion in the CMake discorse on the
- # use of ExternalProject_Add and superbuilds so there's some learning
- # to be done before finalizing a design.
- ##########################################################################
+# The "standard" solution in CMake to this problem is what's called the
+# "superbuild" pattern, in which all necessary builds (including the "primary"
+# build of the project) are managed by a single, higher level build whose job
+# is to manage the ordering and dependencies among the ExternalProjet targets.
+# Because the dependency ordering between ExternalProject targets *does*
+# provide the necessary guarantees, it is possible to prepare a reliably
+# building system. Unfortunately, for BRL-CAD this greatly complicates the
+# custom logic previously prepared to support working from both build and
+# install locations, as well as the logic providing information about install
+# target locations to libbu directory management mechanisms.
+# To work around this issue, we exploit one other guaranteed ordering in the
+# workflow process - the configure step itself. In this mode, the setup and
+# compilation of any necessary 3rd party dependencies are invoked by the
+# configure stage, rather than the build stage. In essence, it becomes
+# the role of configure not simply to detect dependencies, but to guarantee
+# them - whether by system detection or by triggering the compilation process
+# to create them. The superbuild mechanism is still used with ExternalProject
+# to prepare them, allowing for managing non-CMake based external builds, but
+# that process is independent of the main BRL-CAD build, which just needs to
+# call find_package with the appropriate arguments.
- # We had to get the feature level variables from the user first, since they
- # have an impact on whic libraries are required. That means we'll need to
- # pass all the BRLCAD_ variable states to the subbuild, since the user should
- # only specify them once. The below snippit shows how to retrieve them
- # (https://stackoverflow.com/a/9328525) but the question of whether we can
- # programmatically assign them to the arguments of an ExternalProejct_Add
- # build is open/untested. Worst case we can generate the project_add
- # description in a file and include it.
- get_cmake_property(VARS VARIABLES)
- list(SORT VARS)
- foreach(v ${VARS})
- if ("${v}" MATCHES "^BRLCAD*" AND NOT "${v}" MATCHES "DESCRIPTION$" AND
NOT "${v}" MATCHES "AVAILABLE$")
- message("${v}: ${${v}}")
- endif ()
- endforeach(v ${VARS})
+# Step 1 is to write out all BRL-CAD related variables to a file for
+# loading by the 3rd party superbuild: (https://stackoverflow.com/a/9328525)
+file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/superbuild")
+file(WRITE ${CMAKE_BINARY_DIR}/superbuild/brlcad_vars.cmake "\# Feature
variables\n")
+get_cmake_property(VARS VARIABLES)
+list(SORT VARS)
+foreach(v ${VARS})
+ if ("${v}" MATCHES "^BRLCAD*" AND NOT "${v}" MATCHES "DESCRIPTION$" AND NOT
"${v}" MATCHES "AVAILABLE$")
+ file(APPEND ${CMAKE_BINARY_DIR}/superbuild/brlcad_vars.cmake "set(${v}
\"${${v}}\")\n")
+ endif ()
+endforeach(v ${VARS})
- # The pattern here is similar to the fork-exec model - the CMakeLists.txt
- # file without the SUBBUILD flag defined simply sets the stage and enters the
- # superbuild directory. In addition to executing any necessary
- # ExternalProject_Add builds, the superbuild's final task is to build
- # BRL-CAD as an ExternalProject_Add subproject of itself.
- add_subdirectory(src/superbuild)
+# Now we prepare and invoke the superbuild as a separate process
+execute_process(
+ COMMAND ${CMAKE_COMMAND} -S ${CMAKE_SOURCE_DIR}/src/superbuild
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/superbuild"
+ )
+execute_process(
+ COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR}/superbuild --config
Release --target all
+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/superbuild"
+ )
- # TODO - if we go this route, the final make install and CPack package
building
- # is going to be the responsibility of the superbuild, not the "main" BRL-CAD
- # build. That may mean we'll have to manage the BRL-CAD outputs exactly the
- # same way we're going to have to handle the src/other build outputs...
urk...
+if (NOT EXISTS ${CMAKE_BINARY_DIR}/superbuild.cmake)
+ message(FATAL_ERROR "Third party library info file
${CMAKE_BINARY_DIR}/superbuild.cmake was not found.")
+endif (NOT EXISTS ${CMAKE_BINARY_DIR}/superbuild.cmake)
- # The top level superbuild is done at this point.
- return()
-endif (NOT DEFINED SUBBUILD)
+include(${CMAKE_BINARY_DIR}/superbuild.cmake)
+message("LEMON_TEMPLATE: ${LEMON_TEMPLATE}")
-# If we're not a superbuild, it's time to figure out which 3rd party libs got
installed
-# into the bin/lib/etc. dirs and set up the necessary logic to have them
managed by
-# this build's make install. They not only need to be bundled, but also need
to have
-# the same rpath settings used as the "main" BRL-CAD libraries so everything
in the
-# binary packages works together.
+find_package(LEMON)
+find_package(RE2C)
+find_package(PERPLEX)
+find_package(NETPBM)
+find_package(STEPCODE)
+#find_package(BSON)
+find_package(PROJ4)
+find_package(GDAL)
+find_package(TCL)
-# TODO - add superbuild subdir with different flags set? Need to think about
how
-# to manage this...
+message("LEMON_TEMPLATE: ${LEMON_TEMPLATE}")
-# From here on out, the build logic will assume that all third party
dependencies
-# of any sort have been properly found - either from system libs, or supplied
-# by the superbuild's external project builds and installs into the parent
-# CMake build directory. One of the necessary tricks will be for the subbuild
-# to target for it's output bin/lib/etc. dirs the same directories as the
-# superbuild.
-if (DEFINED SUBBUILD)
- message("SUBBUILD: ${SUBBUILD}!\n")
- #return()
-endif (DEFINED SUBBUILD)
#---------------------------------------------------------------------
# Let CMake know where to look for our counting file for configuration
# passes. It will impact whether we print certain messages
Deleted: brlcad/branches/thirdparty_rework/misc/tools/lemon.dist
===================================================================
--- brlcad/branches/thirdparty_rework/misc/tools/lemon.dist 2020-10-05
16:23:00 UTC (rev 77334)
+++ brlcad/branches/thirdparty_rework/misc/tools/lemon.dist 2020-10-05
17:16:38 UTC (rev 77335)
@@ -1,6 +0,0 @@
-set(lemon_ignore_files
-CMakeLists.txt
-README
-lemon.c
-lempar.c
-)
Deleted: brlcad/branches/thirdparty_rework/misc/tools/perplex.dist
===================================================================
--- brlcad/branches/thirdparty_rework/misc/tools/perplex.dist 2020-10-05
16:23:00 UTC (rev 77334)
+++ brlcad/branches/thirdparty_rework/misc/tools/perplex.dist 2020-10-05
17:16:38 UTC (rev 77335)
@@ -1,15 +0,0 @@
-set(perplex_ignore_files
-CHANGELOG.txt
-CMake/FindLEMON.cmake
-CMake/FindRE2C.cmake
-CMakeLists.txt
-README.txt
-mbo_getopt.cpp
-mbo_getopt.h
-parser.y
-perplex.cpp
-perplex.h
-perplex_template.c
-scanner.re
-token_type.h
-)
Deleted: brlcad/branches/thirdparty_rework/misc/tools/re2c.dist
===================================================================
--- brlcad/branches/thirdparty_rework/misc/tools/re2c.dist 2020-10-05
16:23:00 UTC (rev 77334)
+++ brlcad/branches/thirdparty_rework/misc/tools/re2c.dist 2020-10-05
17:16:38 UTC (rev 77335)
@@ -1,33 +0,0 @@
-set(re2c_ignore_files
-CMake/FindLEMON.cmake
-CMakeLists.txt
-README.in
-actions.cc
-basics.h
-bootstrap/scanner.cc
-code.cc
-code.h
-code_names.h
-config.h.in
-config_w32.h.in
-configure.in
-dfa.cc
-dfa.h
-globals.h
-ins.h
-main.cc
-mbo_getopt.cc
-mbo_getopt.h
-parser.yy
-re.h
-re2c.1.in
-re2c.spec.in
-re2c_parser.h
-scanner.h
-scanner.re
-stream_lc.h
-substr.cc
-substr.h
-token.h
-translate.cc
-)
Modified:
brlcad/branches/thirdparty_rework/src/libgcv/plugins/obj/wfobj/CMakeLists.txt
===================================================================
---
brlcad/branches/thirdparty_rework/src/libgcv/plugins/obj/wfobj/CMakeLists.txt
2020-10-05 16:23:00 UTC (rev 77334)
+++
brlcad/branches/thirdparty_rework/src/libgcv/plugins/obj/wfobj/CMakeLists.txt
2020-10-05 17:16:38 UTC (rev 77335)
@@ -80,6 +80,7 @@
find_package(LEMON REQUIRED)
find_package(RE2C REQUIRED)
find_package(PERPLEX REQUIRED)
+message("LEMON_TEMPLATE: ${LEMON_TEMPLATE}")
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/WFBOBJ_SCANNER_SO")
set(WFOBJ_SCANNER_WORKING_DIR "${CMAKE_CURRENT_BINARY_DIR}/WFBOBJ_SCANNER_SO")
Added:
brlcad/branches/thirdparty_rework/src/superbuild/CMake/ExternalProject_Target.cmake
===================================================================
---
brlcad/branches/thirdparty_rework/src/superbuild/CMake/ExternalProject_Target.cmake
(rev 0)
+++
brlcad/branches/thirdparty_rework/src/superbuild/CMake/ExternalProject_Target.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,316 @@
+# This is based on the logic generated by CMake for EXPORT, but customized for
+# use with ExternalProject:
+#
+# https://cmake.org/cmake/help/latest/module/ExternalProject.html
+#
+# The goal is to create an imported target based on the ExternalProject
+# information, and then append the necessary install logic to manage RPath
+# settings in the external projects as if the external files were built by the
+# main CMake project.
+
+# TODO - need to rework this in a way that's compatible with the superbuild
+# pattern. Main BRL-CAD build won't have the ExternalProject_Add targets from
+# the superbuild, so we need another way to handle getting the necessary
+# info to the main build. Maybe useful:
+#
https://gitlab.kitware.com/cmake/community/-/wikis/doc/tutorials/How-to-create-a-ProjectConfig.cmake-file
+
+# The catch to this is that the external project outputs MUST be built in a way
+# that is compatible with CMake's RPath handling assumptions. See
+#
https://stackoverflow.com/questions/41175354/can-i-install-shared-imported-library
+# for one of the issues surrounding this - file(RPATH_CHANGE) must be able to
+# succeed, and it is up to the 3rd party build setups to prepare their outputs
+# to be ready. The key variable CMAKE_BUILD_RPATH comes from running the
+# function cmake_set_rpath, which must be available.
+
+# Custom patch utility to replace the build directory path with the install
+# directory path in text files - make sure CMAKE_BINARY_DIR and
+# CMAKE_INSTALL_PREFIX are finalized before generating this file!
+configure_file(${BDEPS_SOURCE_DIR}/CMake/buildpath_replace.cxx.in
${CMAKE_CURRENT_BINARY_DIR}/buildpath_replace.cxx)
+add_executable(buildpath_replace
${CMAKE_CURRENT_BINARY_DIR}/buildpath_replace.cxx)
+
+# Custom patch utility for external RPath preparation
+configure_file(${BDEPS_SOURCE_DIR}/CMake/rpath_replace.cxx.in
${CMAKE_CURRENT_BINARY_DIR}/rpath_replace.cxx @ONLY)
+add_executable(rpath_replace ${CMAKE_CURRENT_BINARY_DIR}/rpath_replace.cxx)
+
+function(ExternalProject_ByProducts extproj E_IMPORT_PREFIX)
+
+ cmake_parse_arguments(E "FIXPATH" "" "" ${ARGN})
+
+ if (EXTPROJ_VERBOSE)
+
+ list(LENGTH E_UNPARSED_ARGUMENTS FCNT)
+ if (E_FIXPATH)
+ if (FCNT GREATER 1)
+ message("${extproj}: Adding path adjustment and installation rules for
${FCNT} byproducts")
+ else (FCNT GREATER 1)
+ message("${extproj}: Adding path adjustment and installation rules for
${FCNT} byproduct")
+ endif (FCNT GREATER 1)
+ else (E_FIXPATH)
+ if (FCNT GREATER 1)
+ message("${extproj}: Adding install rules for ${FCNT} byproducts")
+ else (FCNT GREATER 1)
+ message("${extproj}: Adding install rules for ${FCNT} byproduct")
+ endif (FCNT GREATER 1)
+ endif (E_FIXPATH)
+
+ endif (EXTPROJ_VERBOSE)
+
+ foreach (bpf ${E_UNPARSED_ARGUMENTS})
+
+ set(D_IMPORT_PREFIX "${E_IMPORT_PREFIX}")
+ get_filename_component(BPF_DIR "${bpf}" DIRECTORY)
+ if (BPF_DIR)
+ set(D_IMPORT_PREFIX "${D_IMPORT_PREFIX}/${BPF_DIR}")
+ endif (BPF_DIR)
+
+ set(I_IMPORT_PREFIX ${CMAKE_BINARY_DIR}/${E_IMPORT_PREFIX})
+ install(FILES "${I_IMPORT_PREFIX}/${bpf}" DESTINATION
"${D_IMPORT_PREFIX}/")
+ if (E_FIXPATH)
+ # Note - proper quoting for install(CODE) is extremely important for
CPack, see
+ # https://stackoverflow.com/a/48487133
+ install(CODE "execute_process(COMMAND
${CMAKE_BINARY_DIR}/${BIN_DIR}/buildpath_replace${CMAKE_EXECUTABLE_SUFFIX}
\"\${CMAKE_INSTALL_PREFIX}/${E_IMPORT_PREFIX}/${bpf}\")")
+ endif (E_FIXPATH)
+
+
+ endforeach (bpf ${E_UNPARSED_ARGUMENTS})
+
+endfunction(ExternalProject_ByProducts)
+
+
+function(ET_target_props etarg IN_IMPORT_PREFIX IN_LINK_TARGET)
+
+ cmake_parse_arguments(ET "STATIC;EXEC" "LINK_TARGET_DEBUG" "" ${ARGN})
+
+ if(NOT CMAKE_CONFIGURATION_TYPES)
+
+ if(ET_STATIC)
+ set(IMPORT_PREFIX "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
+ elseif(ET_EXEC)
+ set(IMPORT_PREFIX "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+ else()
+ set(IMPORT_PREFIX "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+ endif(ET_STATIC)
+ if(IN_IMPORT_PREFIX)
+ set(IMPORT_PREFIX "${IMPORT_PREFIX}/${IN_IMPORT_PREFIX}")
+ endif(IN_IMPORT_PREFIX)
+
+ set_property(TARGET ${etarg} APPEND PROPERTY IMPORTED_CONFIGURATIONS
NOCONFIG)
+ set_target_properties(${etarg} PROPERTIES
+ IMPORTED_LOCATION_NOCONFIG "${IMPORT_PREFIX}/${IN_LINK_TARGET}"
+ IMPORTED_SONAME_NOCONFIG "${IN_LINK_TARGET}"
+ )
+
+ else(NOT CMAKE_CONFIGURATION_TYPES)
+
+ foreach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
+ string(TOUPPER "${CFG_TYPE}" CFG_TYPE_UPPER)
+
+ # The config variables are the ones set in this mode, but everything is
being targeted to
+ # one consistent top-level layout. Adjust accordingly.
+ if(ET_STATIC)
+ set(IMPORT_PREFIX
"${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}}/../../${LIB_DIR}")
+ elseif(ET_EXEC)
+ set(IMPORT_PREFIX
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}}/../../${BIN_DIR}")
+ else()
+ set(IMPORT_PREFIX
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CFG_TYPE_UPPER}}/../../${LIB_DIR}")
+ endif(ET_STATIC)
+
+ if(IN_IMPORT_PREFIX)
+ set(IMPORT_PREFIX "${IMPORT_PREFIX}/${IN_IMPORT_PREFIX}")
+ endif(IN_IMPORT_PREFIX)
+
+ if("${CFG_TYPE_UPPER}" STREQUAL "DEBUG")
+ set(LINK_TARGET ${ET_LINK_TARGET_DEBUG})
+ else("${CFG_TYPE_UPPER}" STREQUAL "DEBUG")
+ set(LINK_TARGET ${IN_LINK_TARGET})
+ endif("${CFG_TYPE_UPPER}" STREQUAL "DEBUG")
+
+ set_target_properties(${etarg} PROPERTIES
+ IMPORTED_LOCATION_${CFG_TYPE_UPPER} "${IMPORT_PREFIX}/${LINK_TARGET}"
+ IMPORTED_SONAME_${CFG_TYPE_UPPER} "${LINK_TARGET}"
+ )
+
+ if(NOT ET_STATIC AND NOT ET_EXEC AND MSVC)
+ # For Windows, IMPORTED_IMPLIB is important for shared libraries.
+ # It is that property that will tell a toplevel target what to link
against
+ # when building - pointing out the dll isn't enough by itself.
+ string(REPLACE "${CMAKE_SHARED_LIBRARY_SUFFIX}" ".lib" IMPLIB_FILE
"${LINK_TARGET}")
+ set_target_properties(${etarg} PROPERTIES
+ IMPORTED_IMPLIB_${CFG_TYPE_UPPER} "${IMPORT_PREFIX}/${IMPLIB_FILE}"
+ )
+ endif(NOT ET_STATIC AND NOT ET_EXEC AND MSVC)
+
+ endforeach(CFG_TYPE ${CMAKE_CONFIGURATION_TYPES})
+
+ # For everything except Debug, use the Release version
+ #set_target_properties(TARGET ${etarg} PROPERTIES
+ # MAP_IMPORTED_CONFIG_MINSIZEREL Release
+ # MAP_IMPORTED_CONFIG_RELWITHDEBINFO Release
+ # )
+
+ endif(NOT CMAKE_CONFIGURATION_TYPES)
+
+endfunction(ET_target_props)
+
+
+# For a given path, calculate the $ORIGIN style path needed relative
+# to CMAKE_INSTALL_PREFIX
+function(ET_Origin_Path POPATH INIT_PATH)
+
+ get_filename_component(CPATH "${INIT_PATH}" REALPATH)
+ set(RELDIRS)
+ set(FPATH)
+ while (NOT "${CPATH}" STREQUAL "${CMAKE_INSTALL_PREFIX}")
+ get_filename_component(CDIR "${CPATH}" NAME)
+ get_filename_component(CPATH "${CPATH}" DIRECTORY)
+ if (NOT "${RELDIRS}" STREQUAL "")
+ set(RELDIRS "${CDIR}/${RELDIRS}")
+ set(FPATH "../${FPATH}")
+ else (NOT "${RELDIRS}" STREQUAL "")
+ set(RELDIRS "${CDIR}")
+ set(FPATH "../")
+ endif (NOT "${RELDIRS}" STREQUAL "")
+ endwhile()
+
+ set(FPATH "${FPATH}${RELDIRS}")
+
+ set(${POPATH} ${FPATH} PARENT_SCOPE)
+endfunction(ET_Origin_Path)
+
+# Mimic the magic of the CMake install(TARGETS) form of the install command.
+# This is the key to treating external project build outputs as fully managed
+# CMake outputs, and requires that the external project build in such a way
+# that the rpath settings in the build outputs are compatible with this
+# mechanism.
+function(ET_RPath LIB_DIR OUTPUT_DIR SUB_DIR E_OUTPUT_FILE)
+ get_filename_component(RRPATH
"${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/${SUB_DIR}" REALPATH)
+ set(OPATH)
+ ET_Origin_Path(OPATH "${RRPATH}")
+ if (NOT APPLE)
+ set(NEW_RPATH "$ENV{DESTDIR}${RRPATH}:$ORIGIN/${OPATH}")
+ else (NOT APPLE)
+ set(NEW_RPATH "$ENV{DESTDIR}${RRPATH}:@loader_path/${OPATH}")
+ endif (NOT APPLE)
+ if (NOT DEFINED CMAKE_BUILD_RPATH)
+ return()
+ message(FATAL_ERROR "ET_RPath run without CMAKE_BUILD_RPATH defined - run
cmake_set_rpath before defining external projects.")
+ endif (NOT DEFINED CMAKE_BUILD_RPATH)
+ if (NOT "${SUB_DIR}" STREQUAL "")
+ set(OFINAL "${SUB_DIR}/${E_OUTPUT_FILE}")
+ else (NOT "${SUB_DIR}" STREQUAL "")
+ set(OFINAL "${E_OUTPUT_FILE}")
+ endif (NOT "${SUB_DIR}" STREQUAL "")
+ # Note - proper quoting for install(CODE) is extremely important for CPack,
see
+ # https://stackoverflow.com/a/48487133
+ install(CODE "
+ file(RPATH_CHANGE
+ FILE \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${OUTPUT_DIR}/${OFINAL}\"
+ OLD_RPATH \"${CMAKE_BUILD_RPATH}\"
+ NEW_RPATH \"${NEW_RPATH}\")
+ ")
+endfunction(ET_RPath)
+
+function(ExternalProject_Target etarg extproj)
+
+ cmake_parse_arguments(E "RPATH;EXEC"
"SUBDIR;OUTPUT_FILE;LINK_TARGET;LINK_TARGET_DEBUG;STATIC_OUTPUT_FILE;STATIC_LINK_TARGET;STATIC_LINK_TARGET_DEBUG"
"SYMLINKS;DEPS" ${ARGN})
+
+ if(NOT TARGET ${extproj})
+ message(FATAL_ERROR "${extprog} is not a target")
+ endif(NOT TARGET ${extproj})
+
+ # Protect against redefinition of already defined targets.
+ if(TARGET ${etarg})
+ message(FATAL_ERROR "Target ${etarg} is already defined\n")
+ endif(TARGET ${etarg})
+ if(E_STATIC AND TARGET ${etarg}-static)
+ message(FATAL_ERROR "Target ${etarg}-static is already defined\n")
+ endif(E_STATIC AND TARGET ${etarg}-static)
+
+ if (EXTPROJ_VERBOSE)
+ message("${extproj}: Adding target \"${etarg}\"")
+ endif (EXTPROJ_VERBOSE)
+
+ if (E_STATIC_OUTPUT_FILE)
+ set(E_STATIC 1)
+ endif (E_STATIC_OUTPUT_FILE)
+
+ if (E_OUTPUT_FILE AND NOT E_EXEC)
+ set(E_SHARED 1)
+ endif (E_OUTPUT_FILE AND NOT E_EXEC)
+
+ if (E_LINK_TARGET_DEBUG AND NOT MSVC)
+ set(LINK_TARGET_DEBUG "${E_LINK_TARGET_DEBUG}")
+ endif (E_LINK_TARGET_DEBUG AND NOT MSVC)
+
+ if (E_STATIC_LINK_TARGET_DEBUG AND NOT MSVC)
+ set(STATIC LINK_TARGET_DEBUG "${E_STATIC_LINK_TARGET_DEBUG}")
+ endif (E_STATIC_LINK_TARGET_DEBUG AND NOT MSVC)
+
+ # Create imported target - need to both make the target itself
+ # and set the necessary properties. See also
+ #
https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/Exporting-and-Importing-Targets
+
+ # Because the outputs are not properly build target outputs of the primary
+ # CMake project, we need to install as either FILES or PROGRAMS
+ if (NOT E_EXEC)
+
+ # Handle shared library
+ if (E_SHARED)
+ add_library(${etarg} SHARED IMPORTED GLOBAL)
+ if (E_LINK_TARGET AND NOT MSVC)
+ ET_target_props(${etarg} "${E_IMPORT_PREFIX}" ${E_LINK_TARGET}
LINK_TARGET_DEBUG "${LINK_TARGET_DEBUG}")
+ else (E_LINK_TARGET AND NOT MSVC)
+ ET_target_props(${etarg} "${E_IMPORT_PREFIX}" ${E_OUTPUT_FILE}
LINK_TARGET_DEBUG "${LINK_TARGET_DEBUG}")
+ endif (E_LINK_TARGET AND NOT MSVC)
+
+ install(FILES
"${CMAKE_BINARY_DIR}/${LIB_DIR}/${E_SUBDIR}/${E_OUTPUT_FILE}" DESTINATION
${LIB_DIR}/${E_SUBDIR})
+ if (E_RPATH AND NOT MSVC)
+ ET_RPath("${LIB_DIR}" "${LIB_DIR}" "${E_SUBDIR}" "${E_OUTPUT_FILE}")
+ endif (E_RPATH AND NOT MSVC)
+ endif (E_SHARED)
+
+ # If we do have a static lib as well, handle that
+ if (E_STATIC AND BUILD_STATIC_LIBS)
+ add_library(${etarg}-static STATIC IMPORTED GLOBAL)
+ if (E_STATIC_LINK_TARGET AND NOT MSVC)
+ ET_target_props(${etarg}-static "${E_IMPORT_PREFIX}"
${E_STATIC_LINK_TARGET} STATIC_LINK_TARGET_DEBUG "${STATIC_LINK_TARGET_DEBUG}"
STATIC)
+ else (E_STATIC_LINK_TARGET AND NOT MSVC)
+ ET_target_props(${etarg}-static "${E_IMPORT_PREFIX}"
${E_STATIC_OUTPUT_FILE} STATIC_LINK_TARGET_DEBUG "${STATIC_LINK_TARGET_DEBUG}"
STATIC)
+ endif (E_STATIC_LINK_TARGET AND NOT MSVC)
+ if (MSVC)
+ install(FILES
"${CMAKE_BINARY_DIR}/${BIN_DIR}/${E_SUBDIR}/${E_OUTPUT_FILE}" DESTINATION
${BIN_DIR}/${E_SUBDIR})
+ else (MSVC)
+ install(FILES
"${CMAKE_BINARY_DIR}/${LIB_DIR}/${E_SUBDIR}/${E_OUTPUT_FILE}" DESTINATION
${LIB_DIR}/${E_SUBDIR})
+ endif (MSVC)
+ endif (E_STATIC AND BUILD_STATIC_LIBS)
+
+ else (NOT E_EXEC)
+
+ add_executable(${etarg} IMPORTED GLOBAL)
+ ET_target_props(${etarg} "${E_IMPORT_PREFIX}" ${E_OUTPUT_FILE} EXEC)
+ install(PROGRAMS
"${CMAKE_BINARY_DIR}/${BIN_DIR}/${E_SUBDIR}/${E_OUTPUT_FILE}" DESTINATION
${BIN_DIR}/${E_SUBDIR})
+ if (E_RPATH AND NOT MSVC)
+ ET_RPath("${LIB_DIR}" "${BIN_DIR}" "${E_SUBDIR}" "${E_OUTPUT_FILE}")
+ endif (E_RPATH AND NOT MSVC)
+
+ endif (NOT E_EXEC)
+
+ # Let CMake know there is a target dependency here, despite this being an
import target
+ add_dependencies(${etarg} ${extproj})
+
+ # Add install rules for any symlinks the caller has listed
+ if(E_SYMLINKS AND NOT MSVC)
+ foreach(slink ${E_SYMLINKS})
+ install(FILES "${CMAKE_BINARY_DIR}/${LIB_DIR}/${E_SUBDIR}/${slink}"
DESTINATION ${LIB_DIR}/${E_SUBDIR})
+ endforeach(slink ${E_SYMLINKS})
+ endif(E_SYMLINKS AND NOT MSVC)
+
+endfunction(ExternalProject_Target)
+
+# 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/CMake/ExternalProject_Target.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/CMake/FindADAPTAGRAMS.cmake
===================================================================
---
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindADAPTAGRAMS.cmake
(rev 0)
+++
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindADAPTAGRAMS.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,63 @@
+# F I N D A D A P T A G R A M S . C M A K E
+# BRL-CAD
+#
+# Copyright (c) 2012-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 Adaptagrams libraries
+#
+# The following variables are set:
+#
+# AVOID_INCLUDE_DIR - where to find libavoid.h, etc.
+# AVOID_LIBRARY - where to find libavoid.a
+# The following variables are set:
+#
+# ADAPTAGRAMS_INCLUDE_DIRS - where to find libavoid.h, etc.
+# ADAPTAGRAMS_LIBRARIES - List of libraries when using Adaptagrams.
+# ADAPTAGRAMS_FOUND - True if libavoid is found.
+
+find_path(AVOID_INCLUDE_DIR libavoid.h PATH_SUFFIXES libavoid)
+find_library(AVOID_LIBRARY NAMES avoid)
+
+set(ADAPTAGRAMS_INCLUDE_DIRS ${AVOID_INCLUDE_DIR} CACHE STRING "Adaptagrams
headers")
+set(ADAPTAGRAMS_LIBRARIES ${AVOID_LIBRARY} CACHE STRING "Adaptagrams libs")
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ADAPTAGRAMS DEFAULT_MSG AVOID_LIBRARY
AVOID_INCLUDE_DIR)
+
+MARK_AS_ADVANCED(ADAPTAGRAMS_LIBRARIES ADAPTAGRAMS_INCLUDE_DIRS AVOID_LIBRARY
AVOID_INCLUDE_DIR)
+# 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/CMake/FindADAPTAGRAMS.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/CMake/FindASTYLE.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindASTYLE.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindASTYLE.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,10 @@
+# The module defines the following variables:
+# ASTYLE_EXECUTABLE - the path to the astyle executable
+#
+#=============================================================================
+
+find_program(ASTYLE_EXECUTABLE astyle DOC "path to the astyle executable")
+mark_as_advanced(ASTYLE_EXECUTABLE)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASTYLE DEFAULT_MSG ASTYLE_EXECUTABLE)
Property changes on:
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindASTYLE.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/CMake/FindAppleseed.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindAppleseed.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindAppleseed.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,82 @@
+
+#
+# This source file is part of appleseed.
+# Visit https://appleseedhq.net/ for additional information and resources.
+#
+# This software is released under the MIT license.
+#
+# Copyright (c) 2014-2018 Esteban Tovagliari, The appleseedhq Organization
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+#
+
+
+#
+# Find appleseed headers and libraries.
+#
+# This module requires the following variables to be defined:
+#
+# APPLESEED_INCLUDE_DIR Path to the src/appleseed directory
+# APPLESEED_LIBRARY Path to the appleseed library file
+#
+# This module defines the following variables:
+#
+# APPLESEED_FOUND True if appleseed was found
+# APPLESEED_INCLUDE_DIRS Where to find appleseed header files
+# APPLESEED_LIBRARIES List of appleseed libraries to link against
+#
+
+include (FindPackageHandleStandardArgs)
+
+find_path (Appleseed_INCLUDE_DIR renderer/api/project.h
+ HINTS
+ ${Appleseed_ROOT}
+ PATH_SUFFIXES
+ include
+ appleseed/include
+ )
+
+find_library (Appleseed_LIBRARY
+ NAMES appleseed
+ HINTS
+ ${Appleseed_ROOT}
+ PATH_SUFFIXES
+ lib64
+ lib
+ )
+
+# Handle the QUIETLY and REQUIRED arguments and set Appleseed_FOUND.
+find_package_handle_standard_args (Appleseed DEFAULT_MSG
+ Appleseed_INCLUDE_DIR
+ Appleseed_LIBRARY
+)
+
+# Set the output variables.
+if (Appleseed_FOUND)
+ set (Appleseed_INCLUDE_DIRS ${Appleseed_INCLUDE_DIR})
+ set (Appleseed_LIBRARIES ${Appleseed_LIBRARY})
+else ()
+ set (Appleseed_INCLUDE_DIRS)
+ set (Appleseed_LIBRARIES)
+endif ()
+
+mark_as_advanced (
+ Appleseed_INCLUDE_DIR
+ Appleseed_LIBRARY
+)
Property changes on:
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindAppleseed.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/CMake/FindBSON.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindBSON.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindBSON.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -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/thirdparty_rework/src/superbuild/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/thirdparty_rework/src/superbuild/CMake/FindBlosc.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindBlosc.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindBlosc.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,218 @@
+# Copyright (c) DreamWorks Animation LLC
+#
+# All rights reserved. This software is distributed under the
+# Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
+#
+# Redistributions of source code must retain the above copyright
+# and license notice and the following restrictions and disclaimer.
+#
+# * Neither the name of DreamWorks Animation nor the names of
+# its contributors may 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
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY 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.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
+# LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
+#
+#[=======================================================================[.rst:
+
+FindBlosc
+---------
+
+Find Blosc include dirs and libraries
+
+Use this module by invoking find_package with the form::
+
+ find_package(Blosc
+ [version] [EXACT] # Minimum or EXACT version e.g. 1.5.0
+ [REQUIRED] # Fail with error if Blosc is not found
+ )
+
+IMPORTED Targets
+^^^^^^^^^^^^^^^^
+
+``Blosc::blosc``
+ This module defines IMPORTED target Blosc::Blosc, if Blosc has been found.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This will define the following variables:
+
+``Blosc_FOUND``
+ True if the system has the Blosc library.
+``Blosc_VERSION``
+ The version of the Blosc library which was found.
+``Blosc_INCLUDE_DIRS``
+ Include directories needed to use Blosc.
+``Blosc_LIBRARIES``
+ Libraries needed to link to Blosc.
+``Blosc_LIBRARY_DIRS``
+ Blosc library directories.
+
+Cache Variables
+^^^^^^^^^^^^^^^
+
+The following cache variables may also be set:
+
+``Blosc_INCLUDE_DIR``
+ The directory containing ``blosc.h``.
+``Blosc_LIBRARY``
+ The path to the Blosc library.
+
+Hints
+^^^^^
+
+Instead of explicitly setting the cache variables, the following variables
+may be provided to tell this module where to look.
+
+``BLOSC_ROOT``
+ Preferred installation prefix.
+``BLOSC_INCLUDEDIR``
+ Preferred include directory e.g. <prefix>/include
+``BLOSC_LIBRARYDIR``
+ Preferred library directory e.g. <prefix>/lib
+``SYSTEM_LIBRARY_PATHS``
+ Paths appended to all include and lib searches.
+
+#]=======================================================================]
+
+mark_as_advanced(
+ Blosc_INCLUDE_DIR
+ Blosc_LIBRARY
+)
+
+# Append BLOSC_ROOT or $ENV{BLOSC_ROOT} if set (prioritize the direct cmake
var)
+set(_BLOSC_ROOT_SEARCH_DIR "")
+
+if(BLOSC_ROOT)
+ list(APPEND _BLOSC_ROOT_SEARCH_DIR ${BLOSC_ROOT})
+else()
+ set(_ENV_BLOSC_ROOT $ENV{BLOSC_ROOT})
+ if(_ENV_BLOSC_ROOT)
+ list(APPEND _BLOSC_ROOT_SEARCH_DIR ${_ENV_BLOSC_ROOT})
+ endif()
+endif()
+
+# Additionally try and use pkconfig to find blosc
+
+find_package(PkgConfig)
+pkg_check_modules(PC_Blosc QUIET blosc)
+
+# ------------------------------------------------------------------------
+# Search for blosc include DIR
+# ------------------------------------------------------------------------
+
+set(_BLOSC_INCLUDE_SEARCH_DIRS "")
+list(APPEND _BLOSC_INCLUDE_SEARCH_DIRS
+ ${BLOSC_INCLUDEDIR}
+ ${_BLOSC_ROOT_SEARCH_DIR}
+ ${PC_Blosc_INCLUDE_DIRS}
+ ${SYSTEM_LIBRARY_PATHS}
+)
+
+# Look for a standard blosc header file.
+find_path(Blosc_INCLUDE_DIR blosc.h
+ NO_DEFAULT_PATH
+ PATHS ${_BLOSC_INCLUDE_SEARCH_DIRS}
+ PATH_SUFFIXES include
+)
+
+if(EXISTS "${Blosc_INCLUDE_DIR}/blosc.h")
+ file(STRINGS "${Blosc_INCLUDE_DIR}/blosc.h"
+ _blosc_version_major_string REGEX "#define BLOSC_VERSION_MAJOR +[0-9]+ "
+ )
+ string(REGEX REPLACE "#define BLOSC_VERSION_MAJOR +([0-9]+).*$" "\\1"
+ _blosc_version_major_string "${_blosc_version_major_string}"
+ )
+ string(STRIP "${_blosc_version_major_string}" Blosc_VERSION_MAJOR)
+
+ file(STRINGS "${Blosc_INCLUDE_DIR}/blosc.h"
+ _blosc_version_minor_string REGEX "#define BLOSC_VERSION_MINOR +[0-9]+ "
+ )
+ string(REGEX REPLACE "#define BLOSC_VERSION_MINOR +([0-9]+).*$" "\\1"
+ _blosc_version_minor_string "${_blosc_version_minor_string}"
+ )
+ string(STRIP "${_blosc_version_minor_string}" Blosc_VERSION_MINOR)
+
+ unset(_blosc_version_major_string)
+ unset(_blosc_version_minor_string)
+
+ set(Blosc_VERSION ${Blosc_VERSION_MAJOR}.${Blosc_VERSION_MINOR})
+endif()
+
+# ------------------------------------------------------------------------
+# Search for blosc lib DIR
+# ------------------------------------------------------------------------
+
+set(_BLOSC_LIBRARYDIR_SEARCH_DIRS "")
+list(APPEND _BLOSC_LIBRARYDIR_SEARCH_DIRS
+ ${BLOSC_LIBRARYDIR}
+ ${_BLOSC_ROOT_SEARCH_DIR}
+ ${PC_Blosc_LIBRARY_DIRS}
+ ${SYSTEM_LIBRARY_PATHS}
+)
+
+# Static library setup
+if(UNIX AND BLOSC_USE_STATIC_LIBS)
+ set(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+endif()
+
+set(BLOSC_PATH_SUFFIXES
+ lib64
+ lib
+)
+
+find_library(Blosc_LIBRARY blosc
+ NO_DEFAULT_PATH
+ PATHS ${_BLOSC_LIBRARYDIR_SEARCH_DIRS}
+ PATH_SUFFIXES ${BLOSC_PATH_SUFFIXES}
+)
+
+if(UNIX AND BLOSC_USE_STATIC_LIBS)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+ unset(_BLOSC_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
+endif()
+
+# ------------------------------------------------------------------------
+# Cache and set Blosc_FOUND
+# ------------------------------------------------------------------------
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Blosc
+ FOUND_VAR Blosc_FOUND
+ REQUIRED_VARS
+ Blosc_LIBRARY
+ Blosc_INCLUDE_DIR
+ VERSION_VAR Blosc_VERSION
+)
+
+if(Blosc_FOUND)
+ set(Blosc_LIBRARIES ${Blosc_LIBRARY})
+ set(Blosc_INCLUDE_DIRS ${Blosc_INCLUDE_DIR})
+ set(Blosc_DEFINITIONS ${PC_Blosc_CFLAGS_OTHER})
+
+ get_filename_component(Blosc_LIBRARY_DIRS ${Blosc_LIBRARY} DIRECTORY)
+
+ if(NOT TARGET Blosc::blosc)
+ add_library(Blosc::blosc UNKNOWN IMPORTED)
+ set_target_properties(Blosc::blosc PROPERTIES
+ IMPORTED_LOCATION "${Blosc_LIBRARIES}"
+ INTERFACE_COMPILE_DEFINITIONS "${Blosc_DEFINITIONS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${Blosc_INCLUDE_DIRS}"
+ )
+ endif()
+elseif(Blosc_FIND_REQUIRED)
+ message(FATAL_ERROR "Unable to find Blosc")
+endif()
Property changes on:
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindBlosc.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/CMake/FindFontconfig.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindFontconfig.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindFontconfig.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,101 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[=======================================================================[.rst:
+FindFontconfig
+--------------
+
+Find Fontconfig headers and library.
+
+Imported Targets
+^^^^^^^^^^^^^^^^
+
+``Fontconfig::Fontconfig``
+ The Fontconfig library, if found.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This will define the following variables in your project:
+
+``Fontconfig_FOUND``
+ true if (the requested version of) Fontconfig is available.
+``Fontconfig_VERSION``
+ the version of Fontconfig.
+``Fontconfig_LIBRARIES``
+ the libraries to link against to use Fontconfig.
+``Fontconfig_INCLUDE_DIRS``
+ where to find the Fontconfig headers.
+``Fontconfig_COMPILE_OPTIONS``
+ this should be passed to target_compile_options(), if the
+ target is not used for linking
+
+#]=======================================================================]
+
+
+# use pkg-config to get the directories and then use these values
+# in the FIND_PATH() and FIND_LIBRARY() calls
+find_package(PkgConfig QUIET)
+pkg_check_modules(PKG_FONTCONFIG QUIET fontconfig)
+set(Fontconfig_COMPILE_OPTIONS ${PKG_FONTCONFIG_CFLAGS_OTHER})
+set(Fontconfig_VERSION ${PKG_FONTCONFIG_VERSION})
+
+find_path( Fontconfig_INCLUDE_DIR
+ NAMES
+ fontconfig/fontconfig.h
+ HINTS
+ ${PKG_FONTCONFIG_INCLUDE_DIRS}
+ /usr/X11/include
+)
+
+find_library( Fontconfig_LIBRARY
+ NAMES
+ fontconfig
+ PATHS
+ ${PKG_FONTCONFIG_LIBRARY_DIRS}
+)
+
+if (Fontconfig_INCLUDE_DIR AND NOT Fontconfig_VERSION)
+ file(STRINGS ${Fontconfig_INCLUDE_DIR}/fontconfig/fontconfig.h _contents
REGEX "^#define[ \t]+FC_[A-Z]+[ \t]+[0-9]+$")
+ unset(Fontconfig_VERSION)
+ foreach(VPART MAJOR MINOR REVISION)
+ foreach(VLINE ${_contents})
+ if(VLINE MATCHES "^#define[\t ]+FC_${VPART}[\t ]+([0-9]+)$")
+ set(Fontconfig_VERSION_PART "${CMAKE_MATCH_1}")
+ if(Fontconfig_VERSION)
+ string(APPEND Fontconfig_VERSION ".${Fontconfig_VERSION_PART}")
+ else()
+ set(Fontconfig_VERSION "${Fontconfig_VERSION_PART}")
+ endif()
+ endif()
+ endforeach()
+ endforeach()
+endif ()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Fontconfig
+ FOUND_VAR
+ Fontconfig_FOUND
+ REQUIRED_VARS
+ Fontconfig_LIBRARY
+ Fontconfig_INCLUDE_DIR
+ VERSION_VAR
+ Fontconfig_VERSION
+)
+
+
+if(Fontconfig_FOUND AND NOT TARGET Fontconfig::Fontconfig)
+ add_library(Fontconfig::Fontconfig UNKNOWN IMPORTED)
+ set_target_properties(Fontconfig::Fontconfig PROPERTIES
+ IMPORTED_LOCATION "${Fontconfig_LIBRARY}"
+ INTERFACE_COMPILE_OPTIONS "${Fontconfig_COMPILE_OPTIONS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${Fontconfig_INCLUDE_DIR}"
+ )
+endif()
+
+mark_as_advanced(Fontconfig_LIBRARY Fontconfig_INCLUDE_DIR)
+
+if(Fontconfig_FOUND)
+ set(Fontconfig_LIBRARIES ${Fontconfig_LIBRARY})
+ set(Fontconfig_INCLUDE_DIRS ${Fontconfig_INCLUDE_DIR})
+endif()
Property changes on:
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindFontconfig.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/CMake/FindGECODE.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindGECODE.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindGECODE.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,100 @@
+# F I N D G E C O D E . 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 Gecode constraint programming libraries
+#
+# The following variables are set:
+#
+# GECODE_INCLUDE_DIR
+# GECODE_LIBRARIES
+
+find_path(GECODE_INCLUDE_DIR gecode/search.hh)
+
+find_library(GECODE_SUPPORT_LIB NAMES gecodesupport)
+find_library(GECODE_KERNEL_LIB NAMES gecodekernel)
+find_library(GECODE_SEARCH_LIB NAMES gecodesearch)
+find_library(GECODE_INT_LIB NAMES gecodeint)
+find_library(GECODE_SET_LIB NAMES gecodeset)
+find_library(GECODE_FLOAT_LIB NAMES gecodefloat)
+find_library(GECODE_MINIMODEL_LIB NAMES gecodeminimodel)
+find_library(GECODE_DRIVER_LIB NAMES gecodedriver)
+find_library(GECODE_FLATZINC_LIB NAMES gecodeflatzinc)
+
+set(GECODE_LIBRARIES
+ ${GECODE_SUPPORT_LIB}
+ ${GECODE_KERNEL_LIB}
+ ${GECODE_SEARCH_LIB}
+ ${GECODE_INT_LIB}
+ ${GECODE_SET_LIB}
+ ${GECODE_FLOAT_LIB}
+ ${GECODE_MINIMODEL_LIB}
+ ${GECODE_DRIVER_LIB}
+ ${GECODE_FLATZINC_LIB}
+)
+
+set(GECODE_LIBRARIES "${GECODE_LIBRARIES}" CACHE STRING "Gecode libraries")
+
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(GECODE DEFAULT_MSG
+ GECODE_SUPPORT_LIB
+ GECODE_KERNEL_LIB
+ GECODE_SEARCH_LIB
+ GECODE_INT_LIB
+ GECODE_SET_LIB
+ GECODE_FLOAT_LIB
+ GECODE_MINIMODEL_LIB
+ GECODE_DRIVER_LIB
+ GECODE_FLATZINC_LIB
+ )
+
+mark_as_advanced(
+ GECODE_SUPPORT_LIB
+ GECODE_KERNEL_LIB
+ GECODE_SEARCH_LIB
+ GECODE_INT_LIB
+ GECODE_SET_LIB
+ GECODE_FLOAT_LIB
+ GECODE_MINIMODEL_LIB
+ GECODE_DRIVER_LIB
+ GECODE_FLATZINC_LIB
+ )
+
+# 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/CMake/FindGECODE.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/CMake/FindGL.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindGL.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindGL.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,294 @@
+# F I N D G L . C M A K E
+# BRL-CAD
+#
+# Copyright (c) 2001-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.
+#
+###
+# - Try to find OpenGL
+# Once done this will define
+#
+# OPENGL_FOUND - system has OpenGL
+# OPENGL_XMESA_FOUND - system has XMESA
+# OPENGL_GLU_FOUND - system has GLU
+# OPENGL_INCLUDE_DIR_GL - the GL include directory
+# OPENGL_INCLUDE_DIR_GLX - the GLX include directory
+# OPENGL_LIBRARIES - Link these to use OpenGL and GLU
+#
+# If you want to use just GL you can use these values
+# OPENGL_gl_LIBRARY - Path to OpenGL Library
+# OPENGL_glu_LIBRARY - Path to GLU Library
+#
+# Define controlling option OPENGL_USE_AQUA if on Apple -
+# if this is not true, look for the X11 OpenGL. Defaults
+# to true.
+
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+# 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.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+# nor the names of their contributors may 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.
+#
+#
------------------------------------------------------------------------------
+#
+# The above copyright and license notice applies to distributions of
+# CMake in source and binary form. Some source files contain additional
+# notices of original copyright by their contributors; see each source
+# for details. Third-party software packages supplied with CMake under
+# compatible licenses provide their own copyright notices documented in
+# corresponding subdirectories.
+#
+#
------------------------------------------------------------------------------
+#
+# CMake was initially developed by Kitware with the following sponsorship:
+#
+# * National Library of Medicine at the National Institutes of Health
+# as part of the Insight Segmentation and Registration Toolkit (ITK).
+#
+# * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
+# Visualization Initiative.
+#
+# * National Alliance for Medical Image Computing (NAMIC) is funded by the
+# National Institutes of Health through the NIH Roadmap for Medical
Research,
+# Grant U54 EB005149.
+#
+# * Kitware, Inc.
+#
+#=============================================================================
+
+if(WIN32)
+
+ if(CYGWIN)
+
+ find_library(OPENGL_gl_LIBRARY opengl32 )
+
+ find_library(OPENGL_glu_LIBRARY glu32 )
+
+ find_path(OPENGL_INCLUDE_DIR_GL GL/gl.h )
+
+ endif(CYGWIN)
+
+ if(BORLAND)
+ set(OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32")
+ set(OPENGL_glu_LIBRARY import32 CACHE STRING "GLU library for win32")
+ endif(BORLAND)
+
+ if (NOT CYGWIN AND NOT BORLAND)
+ set(OPENGL_gl_LIBRARY opengl32 CACHE STRING "OpenGL library for win32")
+ set(OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32")
+ endif (NOT CYGWIN AND NOT BORLAND)
+
+else (WIN32)
+
+ # The first line below is to make sure that the proper headers
+ # are used on a Linux machine with the NVidia drivers installed.
+ # They replace Mesa with NVidia's own library but normally do not
+ # install headers and that causes the linking to
+ # fail since the compiler finds the Mesa headers but NVidia's library.
+ # Make sure the NVIDIA directory comes BEFORE the others.
+ # - Atanas Georgiev <[email protected]>
+
+
+ set(OPENGL_INC_SEARCH_PATH
+ /usr/share/doc/NVIDIA_GLX-1.0/include
+ /usr/X11/include
+ /usr/X11R7/include
+ /usr/X11R6/include
+ /usr/include/X11
+ /usr/local/include/X11
+ /usr/local/include
+ /usr/include
+ /usr/openwin/share/include
+ /usr/openwin/include
+ /usr/pkg/xorg/include
+ /opt/X11/include
+ /opt/graphics/OpenGL/include
+ )
+ # Handle HP-UX cases where we only want to find OpenGL in either hpux64
+ # or hpux32 depending on if we're doing a 64 bit build.
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(HPUX_IA_OPENGL_LIB_PATH /opt/graphics/OpenGL/lib/hpux32/)
+ else(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(HPUX_IA_OPENGL_LIB_PATH
+ /opt/graphics/OpenGL/lib/hpux64/
+ /opt/graphics/OpenGL/lib/pa20_64)
+ endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+
+ get_property(SEARCH_64BIT GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
+ if(SEARCH_64BIT)
+ set(64BIT_DIRS "/usr/lib64/X11;/usr/lib64;/usr/lib/x86_64-linux-gnu")
+ else(SEARCH_64BIT)
+ set(32BIT_DIRS "/usr/lib/X11;/usr/lib;/usr/lib/i386-linux-gnu")
+ endif(SEARCH_64BIT)
+
+ set(OPENGL_LIB_SEARCH_PATH
+ ${64BIT_DIRS}
+ ${32BIT_DIRS}
+ /usr/X11/lib
+ /usr/X11R7/lib
+ /usr/X11R6/lib
+ /usr/shlib
+ /usr/openwin/lib
+ /opt/X11/lib
+ /opt/graphics/OpenGL/lib
+ /usr/pkg/xorg/lib
+ ${HPUX_IA_OPENGL_LIB_PATH}
+ )
+
+ if(APPLE)
+ OPTION(OPENGL_USE_AQUA "Require native OSX Framework version of OpenGL."
ON)
+ endif(APPLE)
+
+ if(OPENGL_USE_AQUA)
+ find_library(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX" )
+ find_library(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX")
+ find_path(OPENGL_INCLUDE_DIR_GL OpenGL/gl.h DOC "Include for OpenGL on
OSX")
+ else(OPENGL_USE_AQUA)
+ # If we're on Apple and not using Aqua, we don't want frameworks
+ set(CMAKE_FIND_FRAMEWORK_CACHED "${CMAKE_FIND_FRAMEWORK}")
+ set(CMAKE_FIND_FRAMEWORK "NEVER")
+
+ find_path(OPENGL_INCLUDE_DIR_GL GL/gl.h ${OPENGL_INC_SEARCH_PATH}
NO_CMAKE_SYSTEM_PATH)
+ find_path(OPENGL_INCLUDE_DIR_GLX GL/glx.h ${OPENGL_INC_SEARCH_PATH}
NO_CMAKE_SYSTEM_PATH)
+ find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h ${OPENGL_INC_SEARCH_PATH}
NO_CMAKE_SYSTEM_PATH)
+ find_library(OPENGL_gl_LIBRARY NAMES GL MesaGL PATHS
${OPENGL_LIB_SEARCH_PATH} NO_CMAKE_SYSTEM_PATH)
+ find_library(OPENGL_gldispatch_LIBRARY NAMES GLdispatch PATHS
${OPENGL_LIB_SEARCH_PATH} NO_CMAKE_SYSTEM_PATH)
+
+ # On Unix OpenGL most certainly always requires X11.
+ # Feel free to tighten up these conditions if you don't
+ # think this is always true.
+ # It's not true on OSX.
+
+ if(OPENGL_gl_LIBRARY)
+ if(NOT X11_FOUND)
+ include(FindX11)
+ endif(NOT X11_FOUND)
+ if(X11_FOUND)
+ set(OPENGL_LIBRARIES ${X11_LIBRARIES})
+ endif(X11_FOUND)
+ endif(OPENGL_gl_LIBRARY)
+
+ find_library(OPENGL_glu_LIBRARY NAMES GLU MesaGLU PATHS
${OPENGL_LIB_SEARCH_PATH} NO_CMAKE_SYSTEM_PATH)
+
+ set(CMAKE_FIND_FRAMEWORK "${CMAKE_FIND_FRAMEWORK_CACHED}")
+ endif(OPENGL_USE_AQUA)
+
+endif(WIN32)
+
+set( OPENGL_FOUND "NO" )
+
+if(X11_FOUND)
+ if(OPENGL_INCLUDE_DIR_GLX AND OPENGL_INCLUDE_DIR_GL AND OPENGL_gl_LIBRARY)
+ set(OPENGL_FOUND "YES" )
+ endif(OPENGL_INCLUDE_DIR_GLX AND OPENGL_INCLUDE_DIR_GL AND OPENGL_gl_LIBRARY)
+else(X11_FOUND)
+ if(MSVC)
+ if(OPENGL_gl_LIBRARY)
+ set(OPENGL_FOUND "YES" )
+ endif(OPENGL_gl_LIBRARY)
+ else(MSVC)
+ if(OPENGL_INCLUDE_DIR_GL AND OPENGL_gl_LIBRARY)
+ set(OPENGL_FOUND "YES" )
+ endif(OPENGL_INCLUDE_DIR_GL AND OPENGL_gl_LIBRARY)
+ endif(MSVC)
+endif(X11_FOUND)
+
+
+if(OPENGL_FOUND)
+ if(OPENGL_xmesa_INCLUDE_DIR)
+ set( OPENGL_XMESA_FOUND "YES" )
+ else(OPENGL_xmesa_INCLUDE_DIR)
+ set( OPENGL_XMESA_FOUND "NO" )
+ endif(OPENGL_xmesa_INCLUDE_DIR)
+
+ set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES})
+ if(OPENGL_glu_LIBRARY)
+ set(OPENGL_GLU_FOUND "YES" )
+ set(OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} )
+ else(OPENGL_glu_LIBRARY)
+ set( OPENGL_GLU_FOUND "NO" )
+ endif(OPENGL_glu_LIBRARY)
+
+ if(OPENGL_gldispatch_LIBRARY)
+ set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} ${OPENGL_gldispatch_LIBRARY})
+ endif(OPENGL_gldispatch_LIBRARY)
+
+ # This deprecated setting is for backward compatibility with CMake1.4
+ set(OPENGL_LIBRARY ${OPENGL_LIBRARIES})
+else(OPENGL_FOUND)
+ # We don't have enough, so no partials - clean up
+ set(OPENGL_INCLUDE_DIR_GL "" CACHE STRING "OpenGL not found" FORCE)
+ set(OPENGL_INCLUDE_DIR_GLX "" CACHE STRING "OpenGL not found" FORCE)
+ set(OPENGL_xmesa_INCLUDE_DIR "" CACHE STRING "OpenGL not found" FORCE)
+ set(OPENGL_glu_LIBRARY "" CACHE STRING "OpenGL not found" FORCE)
+ set(OPENGL_gl_LIBRARY "" CACHE STRING "OpenGL not found" FORCE)
+endif(OPENGL_FOUND)
+
+mark_as_advanced(
+ OPENGL_INCLUDE_DIR_GL
+ OPENGL_INCLUDE_DIR_GLX
+ OPENGL_xmesa_INCLUDE_DIR
+ OPENGL_glu_LIBRARY
+ OPENGL_gl_LIBRARY
+ )
+
+# 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/CMake/FindGL.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/CMake/FindIlmBase.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindIlmBase.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindIlmBase.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,337 @@
+# Copyright (c) DreamWorks Animation LLC
+#
+# All rights reserved. This software is distributed under the
+# Mozilla Public License 2.0 ( http://www.mozilla.org/MPL/2.0/ )
+#
+# Redistributions of source code must retain the above copyright
+# and license notice and the following restrictions and disclaimer.
+#
+# * Neither the name of DreamWorks Animation nor the names of
+# its contributors may 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
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY 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.
+# IN NO EVENT SHALL THE COPYRIGHT HOLDERS' AND CONTRIBUTORS' AGGREGATE
+# LIABILITY FOR ALL CLAIMS REGARDLESS OF THEIR BASIS EXCEED US$250.00.
+#
+#[=======================================================================[.rst:
+
+FindIlmBase
+-----------
+
+Find IlmBase include dirs and libraries
+
+Use this module by invoking find_package with the form::
+
+ find_package(IlmBase
+ [version] [EXACT] # Minimum or EXACT version
+ [REQUIRED] # Fail with error if IlmBase is not found
+ [COMPONENTS <libs>...] # IlmBase libraries by their canonical name
+ # e.g. "Half" for "libHalf"
+ )
+
+IMPORTED Targets
+^^^^^^^^^^^^^^^^
+
+``IlmBase::Half``
+ The Half library target.
+``IlmBase::Iex``
+ The Iex library target.
+``IlmBase::IexMath``
+ The IexMath library target.
+``IlmBase::IlmThread``
+ The IlmThread library target.
+``IlmBase::Imath``
+ The Imath library target.
+
+Result Variables
+^^^^^^^^^^^^^^^^
+
+This will define the following variables:
+
+``IlmBase_FOUND``
+ True if the system has the IlmBase library.
+``IlmBase_VERSION``
+ The version of the IlmBase library which was found.
+``IlmBase_INCLUDE_DIRS``
+ Include directories needed to use IlmBase.
+``IlmBase_LIBRARIES``
+ Libraries needed to link to IlmBase.
+``IlmBase_LIBRARY_DIRS``
+ IlmBase library directories.
+``IlmBase_{COMPONENT}_FOUND``
+ True if the system has the named IlmBase component.
+
+Cache Variables
+^^^^^^^^^^^^^^^
+
+The following cache variables may also be set:
+
+``IlmBase_INCLUDE_DIR``
+ The directory containing ``IlmBase/config-auto.h``.
+``IlmBase_{COMPONENT}_LIBRARY``
+ Individual component libraries for IlmBase
+``IlmBase_{COMPONENT}_DLL``
+ Individual component dlls for IlmBase on Windows.
+
+Hints
+^^^^^
+
+Instead of explicitly setting the cache variables, the following variables
+may be provided to tell this module where to look.
+
+``ILMBASE_ROOT``
+ Preferred installation prefix.
+``ILMBASE_INCLUDEDIR``
+ Preferred include directory e.g. <prefix>/include
+``ILMBASE_LIBRARYDIR``
+ Preferred library directory e.g. <prefix>/lib
+``SYSTEM_LIBRARY_PATHS``
+ Paths appended to all include and lib searches.
+
+#]=======================================================================]
+
+# Support new if() IN_LIST operator
+if(POLICY CMP0057)
+ cmake_policy(SET CMP0057 NEW)
+endif()
+
+mark_as_advanced(
+ IlmBase_INCLUDE_DIR
+ IlmBase_LIBRARY
+)
+
+set(_ILMBASE_COMPONENT_LIST
+ Half
+ Iex
+ IexMath
+ IlmThread
+ Imath
+)
+
+if(IlmBase_FIND_COMPONENTS)
+ set(ILMBASE_COMPONENTS_PROVIDED TRUE)
+ set(_IGNORED_COMPONENTS "")
+ foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
+ if(NOT ${COMPONENT} IN_LIST _ILMBASE_COMPONENT_LIST)
+ list(APPEND _IGNORED_COMPONENTS ${COMPONENT})
+ endif()
+ endforeach()
+
+ if(_IGNORED_COMPONENTS)
+ message(STATUS "Ignoring unknown components of IlmBase:")
+ foreach(COMPONENT ${_IGNORED_COMPONENTS})
+ message(STATUS " ${COMPONENT}")
+ endforeach()
+ list(REMOVE_ITEM IlmBase_FIND_COMPONENTS ${_IGNORED_COMPONENTS})
+ endif()
+else()
+ set(ILMBASE_COMPONENTS_PROVIDED FALSE)
+ set(IlmBase_FIND_COMPONENTS ${_ILMBASE_COMPONENT_LIST})
+endif()
+
+# Append ILMBASE_ROOT or $ENV{ILMBASE_ROOT} if set (prioritize the direct
cmake var)
+set(_ILMBASE_ROOT_SEARCH_DIR "")
+
+if(ILMBASE_ROOT)
+ list(APPEND _ILMBASE_ROOT_SEARCH_DIR ${ILMBASE_ROOT})
+else()
+ set(_ENV_ILMBASE_ROOT $ENV{ILMBASE_ROOT})
+ if(_ENV_ILMBASE_ROOT)
+ list(APPEND _ILMBASE_ROOT_SEARCH_DIR ${_ENV_ILMBASE_ROOT})
+ endif()
+endif()
+
+# Additionally try and use pkconfig to find IlmBase
+
+find_package(PkgConfig)
+pkg_check_modules(PC_IlmBase QUIET IlmBase)
+
+# ------------------------------------------------------------------------
+# Search for IlmBase include DIR
+# ------------------------------------------------------------------------
+
+set(_ILMBASE_INCLUDE_SEARCH_DIRS "")
+list(APPEND _ILMBASE_INCLUDE_SEARCH_DIRS
+ ${ILMBASE_INCLUDEDIR}
+ ${_ILMBASE_ROOT_SEARCH_DIR}
+ ${PC_IlmBase_INCLUDEDIR}
+ ${SYSTEM_LIBRARY_PATHS}
+)
+
+# Look for a standard IlmBase header file.
+find_path(IlmBase_INCLUDE_DIR IlmBaseConfig.h
+ NO_DEFAULT_PATH
+ PATHS ${_ILMBASE_INCLUDE_SEARCH_DIRS}
+ PATH_SUFFIXES include/OpenEXR OpenEXR
+)
+
+if(EXISTS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h")
+ # Get the ILMBASE version information from the config header
+ file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
+ _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR "
+ )
+ string(REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" ""
+ _ilmbase_version_major_string "${_ilmbase_version_major_string}"
+ )
+ string(STRIP "${_ilmbase_version_major_string}" IlmBase_VERSION_MAJOR)
+
+ file(STRINGS "${IlmBase_INCLUDE_DIR}/IlmBaseConfig.h"
+ _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR "
+ )
+ string(REGEX REPLACE "#define ILMBASE_VERSION_MINOR" ""
+ _ilmbase_version_minor_string "${_ilmbase_version_minor_string}"
+ )
+ string(STRIP "${_ilmbase_version_minor_string}" IlmBase_VERSION_MINOR)
+
+ unset(_ilmbase_version_major_string)
+ unset(_ilmbase_version_minor_string)
+
+ set(IlmBase_VERSION ${IlmBase_VERSION_MAJOR}.${IlmBase_VERSION_MINOR})
+endif()
+
+# ------------------------------------------------------------------------
+# Search for ILMBASE lib DIR
+# ------------------------------------------------------------------------
+
+set(_ILMBASE_LIBRARYDIR_SEARCH_DIRS "")
+
+# Append to _ILMBASE_LIBRARYDIR_SEARCH_DIRS in priority order
+
+list(APPEND _ILMBASE_LIBRARYDIR_SEARCH_DIRS
+ ${ILMBASE_LIBRARYDIR}
+ ${_ILMBASE_ROOT_SEARCH_DIR}
+ ${PC_IlmBase_LIBDIR}
+ ${SYSTEM_LIBRARY_PATHS}
+)
+
+# Build suffix directories
+
+set(ILMBASE_PATH_SUFFIXES
+ lib64
+ lib
+)
+
+if(UNIX)
+ list(INSERT ILMBASE_PATH_SUFFIXES 0 lib/x86_64-linux-gnu)
+endif()
+
+set(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+
+# library suffix handling
+if(WIN32)
+ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
+ "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.lib"
+ )
+else()
+ if(ILMBASE_USE_STATIC_LIBS)
+ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
+ "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.a"
+ )
+ else()
+ if(APPLE)
+ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
+ "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.dylib"
+ )
+ else()
+ list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES
+ "-${IlmBase_VERSION_MAJOR}_${IlmBase_VERSION_MINOR}.so"
+ )
+ endif()
+ endif()
+endif()
+
+set(IlmBase_LIB_COMPONENTS "")
+
+foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
+ find_library(IlmBase_${COMPONENT}_LIBRARY ${COMPONENT}
+ NO_DEFAULT_PATH
+ PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS}
+ PATH_SUFFIXES ${ILMBASE_PATH_SUFFIXES}
+ )
+ list(APPEND IlmBase_LIB_COMPONENTS ${IlmBase_${COMPONENT}_LIBRARY})
+
+ if(WIN32 AND NOT ILMBASE_USE_STATIC_LIBS)
+ set(_ILMBASE_TMP ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll")
+ find_library(IlmBase_${COMPONENT}_DLL ${COMPONENT}
+ NO_DEFAULT_PATH
+ PATHS ${_ILMBASE_LIBRARYDIR_SEARCH_DIRS}
+ PATH_SUFFIXES bin
+ )
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_TMP})
+ unset(_ILMBASE_TMP)
+ endif()
+
+ if(IlmBase_${COMPONENT}_LIBRARY)
+ set(IlmBase_${COMPONENT}_FOUND TRUE)
+ else()
+ set(IlmBase_${COMPONENT}_FOUND FALSE)
+ endif()
+endforeach()
+
+# reset lib suffix
+
+set(CMAKE_FIND_LIBRARY_SUFFIXES ${_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+unset(_ILMBASE_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
+
+# ------------------------------------------------------------------------
+# Cache and set ILMBASE_FOUND
+# ------------------------------------------------------------------------
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(IlmBase
+ FOUND_VAR IlmBase_FOUND
+ REQUIRED_VARS
+ IlmBase_INCLUDE_DIR
+ IlmBase_LIB_COMPONENTS
+ VERSION_VAR IlmBase_VERSION
+ HANDLE_COMPONENTS
+)
+
+if(IlmBase_FOUND)
+ set(IlmBase_LIBRARIES ${IlmBase_LIB_COMPONENTS})
+
+ # We have to add both include and include/OpenEXR to the include
+ # path in case OpenEXR and IlmBase are installed separately
+
+ set(IlmBase_INCLUDE_DIRS)
+ list(APPEND IlmBase_INCLUDE_DIRS
+ ${IlmBase_INCLUDE_DIR}/../
+ ${IlmBase_INCLUDE_DIR}
+ )
+ set(IlmBase_DEFINITIONS ${PC_IlmBase_CFLAGS_OTHER})
+
+ set(IlmBase_LIBRARY_DIRS "")
+ foreach(LIB ${IlmBase_LIB_COMPONENTS})
+ get_filename_component(_ILMBASE_LIBDIR ${LIB} DIRECTORY)
+ list(APPEND IlmBase_LIBRARY_DIRS ${_ILMBASE_LIBDIR})
+ endforeach()
+ list(REMOVE_DUPLICATES IlmBase_LIBRARY_DIRS)
+
+ # Configure imported targets
+
+ foreach(COMPONENT ${IlmBase_FIND_COMPONENTS})
+ if(NOT TARGET IlmBase::${COMPONENT})
+ add_library(IlmBase::${COMPONENT} UNKNOWN IMPORTED)
+ set_target_properties(IlmBase::${COMPONENT} PROPERTIES
+ IMPORTED_LOCATION "${IlmBase_${COMPONENT}_LIBRARY}"
+ INTERFACE_COMPILE_OPTIONS "${IlmBase_DEFINITIONS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}"
+ )
+ endif()
+ endforeach()
+
+elseif(IlmBase_FIND_REQUIRED)
+ message(FATAL_ERROR "Unable to find IlmBase")
+endif()
Property changes on:
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindIlmBase.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/CMake/FindLEMON.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindLEMON.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindLEMON.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,233 @@
+#
+# - 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)
+
+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)
+
+ # 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_TEMPLATE} ${LEMON_EXECUTABLE_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}
+ )
+ 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}
+ )
+ 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/thirdparty_rework/src/superbuild/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/thirdparty_rework/src/superbuild/CMake/FindNETPBM.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindNETPBM.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindNETPBM.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -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/thirdparty_rework/src/superbuild/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/thirdparty_rework/src/superbuild/CMake/FindNSIS.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindNSIS.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindNSIS.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,32 @@
+#-------------------------------------------------------------------
+# This file is based on the Wix module from the CMake build system
+# for OGRE (Object-oriented Graphics Rendering Engine)
+# For the latest info, see http://www.ogre3d.org/
+#
+# The contents of this file are placed in the public domain. Feel
+# free to make use of it in any way you like.
+#-------------------------------------------------------------------
+
+# - Try to find Nullsoft Scriptable Install System (NSIS)
+# You can help this by defining NSIS_HOME in the environment / CMake
+# Once done, this will define
+#
+# NSIS_FOUND - system has NSIS
+# NSIS_BINARY_DIR - location of the NSIS binaries
+
+include(FindPkgMacros)
+
+# Get path, convert backslashes as ${ENV_${var}}
+getenv_path(NSIS_HOME)
+
+# construct search paths
+set(NSIS_PREFIX_PATH ${NSIS_HOME} ${ENV_NSIS_HOME}
+ "C:/Program Files (x86)/NSIS"
+)
+find_path(NSIS_BINARY_DIR NAMES makensis.exe HINTS ${NSIS_PREFIX_PATH}
PATH_SUFFIXES bin)
+
+if(NSIS_BINARY_DIR)
+ set (NSIS_FOUND TRUE)
+endif()
+
+mark_as_advanced(NSIS_BINARY_DIR NSIS_FOUND)
Property changes on:
brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindNSIS.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/CMake/FindOPENNURBS.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindOPENNURBS.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindOPENNURBS.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -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/thirdparty_rework/src/superbuild/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/thirdparty_rework/src/superbuild/CMake/FindOSL.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindOSL.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindOSL.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,89 @@
+# F I N D O S L . 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 OSL Dependencies
+# ================================================
+include(util_macros)
+include(FindOpenEXR)
+include(FindTBB)
+include(FindOIIO)
+
+# ================================================
+# Find OSL
+# ================================================
+
+# If 'OSL' not set, use the env variable of that name if available
+if (NOT OSLHOME)
+ if (NOT $ENV{OSLHOME} STREQUAL "")
+ set (OSLHOME $ENV{OSLHOME})
+ endif ()
+endif ()
+
+message("OSL_HOME = ${OSLHOME}")
+
+# Find OSL library and its dependencies
+find_library(OSLEXEC_LIBRARY
+ NAMES oslexec
+ PATHS ${OSLHOME}/lib)
+find_library(OSLCOMP_LIBRARY
+ NAMES oslcomp
+ PATHS ${OSLHOME}/lib)
+find_library(OSLQUERY_LIBRARY
+ NAMES oslquery
+ PATHS ${OSLHOME}/lib)
+
+FIND_PATH (OSL_INCLUDES
+ NAMES oslexec.h
+ PATHS ${OSLHOME}/include/OSL)
+
+if (OSLEXEC_LIBRARY AND OSLCOMP_LIBRARY AND OSLQUERY_LIBRARY AND OSL_INCLUDES)
+ message("Found OSL")
+ message("OSL EXEC = ${OSLEXEC_LIBRARY}")
+ message("OSL COMP = ${OSLCOMP_LIBRARY}")
+ message("OSL QUERY = ${OSLQUERY_LIBRARY}")
+ message("OSL INCLUDES = ${OSL_INCLUDES}")
+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/src/superbuild/CMake/FindOSL.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/CMake/FindOpenCL.cmake
===================================================================
--- brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindOpenCL.cmake
(rev 0)
+++ brlcad/branches/thirdparty_rework/src/superbuild/CMake/FindOpenCL.cmake
2020-10-05 17:16:38 UTC (rev 77335)
@@ -0,0 +1,154 @@
+# Module for locating OpenCL.
+#
+# Customizable variables:
+# OPENCL_ROOT_DIR
+# Specifies OpenCL's root directory. The find module uses this variable to
+# locate OpenCL. The variable will be filled automatically unless
explicitly
@@ Diff output truncated at 100000 characters. @@
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