Revision 20fa4ce8d89369441dc4f8a74d62611e8dfa36ea authored by Matthew Woehlke on 18 July 2024, 16:07:26 UTC, committed by Matthew Woehlke on 23 July 2024, 16:13:39 UTC
In order to support generation of Common Package Specifications, the mechanisms CMake uses to export package information need to be made more abstract. The prior commits began this refactoring; this continues by (actually) restructuring the classes used to generate the actual export files. To minimize churn, this introduces virtual base classes and diamond inheritance in order to separate logic which is format-agnostic but depends on the export mode (build-tree versus install-tree) from logic which is format-specific but mode-agnostic. This could probably be refactored further to use helper classes instead, and a future commit may do that, however an initial attempt to do that was proving even more invasive, such that this approach was deemed more manageable. While we're at it, add 'const' in more places where possible.
1 parent 6c66340
FindosgQt.cmake
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindosgQt
---------
This is part of the ``Findosg*`` suite used to find OpenSceneGraph
components. Each component is separate and you must opt in to each
module. You must also opt into OpenGL and OpenThreads (and Producer
if needed) as these modules won't do it for you. This is to allow you
control over your own system piece by piece in case you need to opt
out of certain components or change the Find behavior for a particular
module (perhaps because the default :module:`FindOpenGL` module doesn't
work with your system as an example). If you want to use a more
convenient module that includes everything, use the
:module:`FindOpenSceneGraph` instead of the ``Findosg*.cmake`` modules.
Locate osgQt This module defines:
``OSGQT_FOUND``
Was osgQt found?
``OSGQT_INCLUDE_DIR``
Where to find the headers
``OSGQT_LIBRARIES``
The libraries to link for osgQt (use this)
``OSGQT_LIBRARY``
The osgQt library
``OSGQT_LIBRARY_DEBUG``
The osgQt debug library
``$OSGDIR`` is an environment variable that would correspond to::
./configure --prefix=$OSGDIR
used in building osg.
Created by Eric Wing. Modified to work with osgQt by Robert Osfield,
January 2012.
#]=======================================================================]
# Header files are presumed to be included like
# #include <osg/PositionAttitudeTransform>
# #include <osgQt/GraphicsWindowQt>
include(${CMAKE_CURRENT_LIST_DIR}/Findosg_functions.cmake)
OSG_FIND_PATH (OSGQT osgQt/GraphicsWindowQt)
OSG_FIND_LIBRARY(OSGQT osgQt)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(osgQt DEFAULT_MSG
OSGQT_LIBRARY OSGQT_INCLUDE_DIR)
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...