Commit Graph

57 Commits

Author SHA1 Message Date
Brad King
919ab832e8 FindGLUT: Fix regression when pkg-config is not available
In commit a2fc4b6257 (FindGLUT: Drop the now-unnecessary exclusion of
pkg-config for multiconfig, 2022-10-13, v3.25.0-rc2~16^2) we
accidentally removed the entire condition around the `pkg-config` code
path instead of just the multi-config part.

Fixes: #24095
2022-10-27 12:39:06 -04:00
leha-bot
a2fc4b6257 FindGLUT: Drop the now-unnecessary exclusion of pkg-config for multiconfig
Revert commit e0a62b84b5 (FindGLUT: On Windows and with multiple config
generator do not use pkg-config, 2022-09-27, v3.25.0-rc1~69^2). We now
call `select_library_configurations()` even after using pkg-config,
which will handle the absent libraries on Debug/Release configurations.

Issue: #24028
2022-10-13 10:06:57 -04:00
leha-bot
a60a33dcb0 FindGLUT: Drop the now-unnecessary ALLOW_SYSTEM_CFLAGS logic
Revert commit 8041ca5df0 (FindGLUT: Fix GLUT_INCLUDE_DIRS with
pkg-config and /usr/include, 2022-05-11, v3.24.0-rc1~151^2).
As the main code path will always do `find_path()` which respects the
`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE` variable and will search in system
paths depending on that variable.

Issue: #23474, #24028
2022-10-13 10:04:41 -04:00
leha-bot
4ad57224b5 FindGLUT: Use pkg-config's results as HINTS for normal search
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if
available, 2021-06-11, v3.22.0-rc1~469^2), pkg-config results are used
directly.  However, this is not compatible with other features of
CMake's find logic such as `CMAKE_FIND_ROOT_PATH` and per-config
results.  Switch to a convention already used by pkg-config support in
other find modules, in which the pkg-config results are only used as
hints for the main search logic.

Fixes: #24028
2022-10-13 10:02:46 -04:00
Silvio Traversaro
e0a62b84b5 FindGLUT: On Windows and with multiple config generator do not use pkg-config 2022-09-28 09:40:25 +02:00
Letu Ren
6c053e68df FindGLUT: Remove undocumented variables GLUT_INCLUDE_PATH and GLUT_LIBRARY
Fixes: #23370
2022-05-17 09:08:12 -04:00
Letu Ren
8041ca5df0 FindGLUT: Fix GLUT_INCLUDE_DIRS with pkg-config and /usr/include
Fixes: #23474
2022-05-12 12:58:09 -04:00
Mehdi Chinoune
2c45465ffb FindGLUT: Search for freeglut as well using PkgConfig. 2022-04-11 06:03:10 +01:00
Mehdi Chinoune
804ce3ee42 FindGLUT: Search for "freeglut" first On Windows 2022-04-11 06:02:35 +01:00
nega
b2a7f73b55 FindGLUT: Quiet pkg-config errors
Issue: #23314
2022-03-30 15:59:31 -04:00
Brad King
ba78776a94 Merge topic 'FindGLUT-link-dirs'
44f7238d5d FindGLUT: Use link directories for libs from pkg-config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6985
2022-02-16 09:42:54 -05:00
Silvio Traversaro
44f7238d5d FindGLUT: Use link directories for libs from pkg-config
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if
available, 2021-06-11, v3.22.0-rc1~469^2), the `GLUT_LIBRARIES` may come
from `pkg-config`, in which case they may be `-l` flags instead of
absolute paths.  Propagate `GLUT_LIBRARY_DIRS` to GLUT::GLUT too.

Fixes: #23229
2022-02-15 10:35:11 -05:00
Brad King
6fda93faf8 FindGLUT: Provide modern-named GLUT_INCLUDE_DIRS result variable
Previously this module only provided `GLUT_INCLUDE_DIR`, which does not
follow the modern naming convention documented in `cmake-developer(7)`.

Issue: #23018
2021-12-20 09:53:33 -05:00
Brad King
641b3f4101 FindGLUT: Modernize documentation layout 2021-12-20 09:49:55 -05:00
Brad King
924b2999a1 FindGLUT: Move mark_as_advanced calls closer to find calls 2021-12-20 09:47:41 -05:00
Brad King
ae6b25d920 FindGLUT: Provide legacy GLUT_INCLUDE_DIR result in pkg-config code path
Since commit f90d15458a (FindGLUT: Use pkg-config to find flags if
available, 2021-06-11, v3.22.0-rc1~469^2) we return early if pkg-config
provides the information.  During review of that commit, code to
populate the legacy `GLUT_INCLUDE_DIR` result variable was removed from
that code path.  Add code to provide it.

Also fix the test case to use `GLUT_INCLUDE_DIR`, the result variable
documented officially by the module.

Fixes: #23018
2021-12-17 15:17:29 -05:00
Christopher Degawa
f90d15458a FindGLUT: Use pkg-config to find flags if available
FindGLUT fails to properly link a static libglut as it does not list
the dependencies needed.

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
2021-07-02 13:33:18 -05:00
Christopher Degawa
f3f0401187 FindGLUT: Reduce if/else nesting and indentation
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
2021-07-02 13:33:18 -05:00
Brad King
528fbd61b7 Merge topic 'FindGLUT-macos-tbd'
d29d034e2e FindGLUT: Handle Mojave and Big Sur 'tbd' framework files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5601
2020-12-14 07:11:07 -05:00
Robert Maynard
d29d034e2e FindGLUT: Handle Mojave and Big Sur 'tbd' framework files 2020-12-11 11:01:30 -05:00
Nikita Nemkin
8fea95319b Help: Add .. versionadded directives to module docs
Issue: #19715
2020-12-02 21:00:30 +05:00
Bartosz Kosiorek
cb811d11ce Help: Improve description of modules 2019-04-23 10:39:34 +02:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
Kohányi Róbert
0da645d452 FindGLUT: Find debug/release variants on Windows
* Separate find_library calls to find Release and Debug libs.
* Using select_library_configurations to properly populate required
  variables (similar to FindZLIB).
* Setting Release and Debug specific properties
  (IMPORTED_CONFIGURATIONS_<CONFIG> and IMPORTED_LOCATION_<CONFIG>).
* Falling back to setting just IMPORTED_LOCATION if
  GLUT_glut_LIBRARY_RELEASE or GLUT_glut_LIBRARY_DEBUG are not defined.

This enables proper linking on Windows.

Fixes: #17037
2018-09-25 09:00:54 -04:00
Brad King
e1b67d0373 FindGLUT: Add library dependencies only if they exist
Fixes: #14060
2017-04-26 08:14:08 -04:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Philipp Moeller
144b255b08 FindGLUT.cmake: Add imported targets and documentation
Also let find_library really search for frameworks on OS X.
2014-06-24 14:08:02 -04:00
Kitware Robot
f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Rolf Eike Beer
8e9630c719 FindGLUT: BeOS does not have libXi and libXmu 2013-01-07 23:57:07 +01:00
Kitware Robot
9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot
77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot
7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
Rolf Eike Beer
14dadbde80 FindGLUT: honor REQUIRED (#12466) 2012-02-15 21:54:51 +01:00
David Cole
efd1d9c799 Add freeglut as library name (#10031)
Thanks to Thomas Sondergaard for the patch in the bug report.
2011-01-17 14:19:18 -05:00
Todd Gamblin
2cde67a781 Modules: Fix spelling 'To distributed' -> 'To distribute' 2010-08-09 08:48:31 -04:00
Brad King
c4bb9c9d42 Convert CMake find-modules to BSD License
This adds copyright/license notification blocks CMake's find-modules.
Many of the modules had no notices at all.  Some had notices referring
to the BSD license already.  This commit normalizes existing notices and
adds missing notices.
2009-09-28 11:45:50 -04:00
Bill Hoffman
3677e5b233 BUG: fix for 7746 2008-09-26 20:09:26 -04:00
Bill Hoffman
0deb9012a6 BUG: fix bug 6594 look for glut in more places on windows 2008-03-13 10:56:40 -04:00
Alexander Neundorf
c7770b8edb ENH: use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS() macro in most of the
not-too-complicated modules
-remove unnecessary default search paths used in the FIND_XXX() calls

Alex
2007-07-19 09:00:51 -04:00
Bill Hoffman
2826dc4003 BUG: fix for bug#3646 GLUT not Glut for framework name 2006-10-03 16:18:32 -04:00
Ken Martin
d2689c95a1 ENH: some style fixes for the book 2005-12-15 10:41:19 -05:00
Bill Hoffman
b7fa820118 ENH: add documentation support for modules 2005-12-14 13:51:08 -05:00
Bill Hoffman
68bbbf95a4 BUG: fix for bug 852 2005-07-15 12:57:53 -04:00
Brad King
290ffc01b6 ENH: Removing extra 64-bit search paths. They are now constructed automatically from the paths listed. 2005-04-07 14:27:01 -04:00
Brad King
76f9050026 ENH: Adding support for 64-bit library paths. Contributed by Peter Vanroose. 2005-04-07 13:46:02 -04:00
Bill Hoffman
a688f59519 BUG: fix for bug 743 2004-04-22 17:20:41 -04:00
Luis Ibanez
93d38e24cc ENH: Description of variables now specifies that the full path is required. 2002-12-03 13:44:50 -05:00
Ian Scott
079e8469ab Hide lots of values in the advanced list
Fix some bugs
OpenGL always needs X11 on Unix
2002-09-05 12:00:45 -04:00
Ian Scott
0b288b6121 Fixed mistake in comments
Transferred OPENGL finding logic in from VXL
Added Some backwards compatibility with CMake1.4
2002-09-03 06:10:06 -04:00
Sebastien Barre
84cd5ec124 ENH: add more paths for the HP 2002-06-18 14:26:57 -04:00