Commit Graph

137 Commits

Author SHA1 Message Date
Gyusun
8260c05ee0 Generate Sources of master updated at Sun Aug 21 07:03:15 GMT 2022 2022-08-21 07:03:15 +00:00
Gyusun
9dc72dbd02 Merge https://github.com/nigels-com/glew.git into master HEAD at Sun Aug 21 07:02:53 GMT 2022 2022-08-21 07:02:53 +00:00
Marvin Schmidt
c8a2ddfbe1 cmake: Link libGLX when X11 support is requested
Using cmake (version 3.23.0) the build fails to link the utils
```
[...]
[ 87%] Linking C executable bin/visualinfo                                                                                                                      [113/5249]
/usr/x86_64-pc-linux-gnu/bin/cmake -E cmake_link_script CMakeFiles/visualinfo.dir/link.txt --verbose=1
/usr/host/bin/x86_64-pc-linux-gnu-cc -Wall -g -ggdb3 -O0 -rdynamic CMakeFiles/visualinfo.dir/home/marv/scm/github/glew/src/visualinfo.c.o -o bin/visualinfo  -Wl,-rpath,/h
ome/marv/scm/github/glew/build-obj/lib: lib/libGLEW.so.2.2.0 -lSM -lICE -lX11 -lXext -lOpenGL -lSM -lICE -lX11 -lXext
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: CMakeFiles/visualinfo.dir/home/marv/scm/github/glew/src/visualinfo.c.o: in function `main':
/home/marv/scm/github/glew/src/visualinfo.c:198: undefined reference to `glXQueryExtensionsString'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: CMakeFiles/visualinfo.dir/home/marv/scm/github/glew/src/visualinfo.c.o: in function `CreateContext':
/home/marv/scm/github/glew/src/visualinfo.c:1204: undefined reference to `glXQueryExtension'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: /home/marv/scm/github/glew/src/visualinfo.c:1206: undefined reference to `glXChooseVisual'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: /home/marv/scm/github/glew/src/visualinfo.c:1209: undefined reference to `glXCreateContext'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: /home/marv/scm/github/glew/src/visualinfo.c:1221: undefined reference to `glXMakeCurrent'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: CMakeFiles/visualinfo.dir/home/marv/scm/github/glew/src/visualinfo.c.o: in function `DestroyContext':
/home/marv/scm/github/glew/src/visualinfo.c:1227: undefined reference to `glXDestroyContext'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: lib/libGLEW.so.2.2.0: undefined reference to `glXGetProcAddressARB'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: lib/libGLEW.so.2.2.0: undefined reference to `glXQueryVersion'
/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld: lib/libGLEW.so.2.2.0: undefined reference to `glXGetClientString'
collect2: error: ld returned 1 exit status
```

Commit 2b50f4a ("CMake: Prefer GLVND if available") changed the cmake
policy CMP0072 to `NEW` in order to make the FindOpenGL module prefer the
GLVND libraries (libOpenGL and libGLX) over the legacy GL library (libGL).

The help of the CMP0072 policy states:

> CMP0072
> -------
>
> .. versionadded:: 3.11
>
> ``FindOpenGL`` prefers GLVND by default when available.
>
> The ``FindOpenGL`` module provides an ``OpenGL::GL`` target and an
> ``OPENGL_LIBRARIES`` variable for projects to use for legacy GL interfaces.
> When both a legacy GL library (e.g. ``libGL.so``) and GLVND libraries
> for OpenGL and GLX (e.g. ``libOpenGL.so`` and ``libGLX.so``) are available,
> the module must choose between them.  It documents an ``OpenGL_GL_PREFERENCE``
> variable that can be used to specify an explicit preference.  When no such
> preference is set, the module must choose a default preference.
>
> CMake 3.11 and above prefer to choose GLVND libraries.  This policy provides
> compatibility with projects that expect the legacy GL library to be used.
>
> The ``OLD`` behavior for this policy is to set ``OpenGL_GL_PREFERENCE`` to
> ``LEGACY``.  The ``NEW`` behavior for this policy is to set
> ``OpenGL_GL_PREFERENCE`` to ``GLVND``.
>
> This policy was introduced in CMake version 3.11.  CMake version
> 3.23.0 warns when the policy is not set and uses ``OLD`` behavior.
> Use the ``cmake_policy()`` command to set it to ``OLD`` or ``NEW``
> explicitly.
>
> .. note::
>   The ``OLD`` behavior of a policy is
>   ``deprecated by definition``
>   and may be removed in a future version of CMake.

The changes from the mentioned commit combined with the new behaviour of
the FindOpenGL module resulted in the glew library being linked against
`libOpenGL` instead of `libGL`, but not `libGLX`. Since `libOpenGL`
doesn't link against GLX compared to `libGL` the linker errors above
surfaced. Fix this by explicitly linking against libGLX if GLEW_X11 is
enabled
2022-06-13 12:22:14 +10:00
Marvin Schmidt
5f57b09c04 cmake: Install eglew.h
The eglew.h header was never installed using the CMake build. Fix this
by adding it to the list of public headers
2022-02-09 08:15:29 +10:00
Dmitry Kalinkin
966e53fa15 CMake: don't hardcode "<prefix>/include" in target_include_directories 2022-01-07 12:54:49 +10:00
luz paz
4a757ac7c0 Fix various typos
Found via `codespell -q 3 -L ake,extrem,lod,parms`
2021-12-20 07:31:49 +10:00
Gyusun
8824bc1146 Merge https://github.com/nigels-com/glew.git into master HEAD at Mon Mar 22 00:01:25 GMT 2021 2021-03-22 00:01:25 +00:00
Daniel Bernar
80e061f85d Add ability to change output dirs
https://github.com/nigels-com/glew/issues/264
2021-03-21 12:41:32 +10:00
Julien Schueller
2b50f4acd2 CMake: Prefer GLVND if available 2021-03-21 12:41:04 +10:00
Julien Schueller
2b16160853 CMake: Add BUILD_SHARED_LIBS option 2021-03-21 12:41:04 +10:00
Julien Schueller
e34bb212f6 CMake: Add X11/EGL options 2021-03-21 12:41:04 +10:00
Gyusun
f4165c28eb Merge https://github.com/nigels-com/glew.git into master HEAD at Mon Jan 11 00:02:16 GMT 2021 2021-01-11 00:02:16 +00:00
Danilo Spinella
95329dc4a6 GLEW_EGL: Fix EGL library check 2021-01-10 12:07:23 +10:00
Gyusun
7d44f3c67c Merge https://github.com/nigels-com/glew.git into master HEAD at Fri Mar 6 00:00:50 GMT 2020 2020-03-06 00:00:50 +00:00
Jose Santiago
5ea705737a Link the UTILS to the static library if BUILD_SHARED_LIBS is disabled. 2020-03-06 07:54:09 +10:00
Jose Santiago
882aef9761 Do not put build artifacts in the source directory. 2020-03-06 07:53:49 +10:00
Gyusun
59c63684ee Merge https://github.com/nigels-com/glew.git into master HEAD at Sat Oct 5 09:11:32 GMT 2019 2019-10-05 09:11:32 +00:00
Nigel Stewart
4bbe8aa2ab Visual Studio 16 release-mode cmake fixup: libvcruntime.lib, msvcrt.lib 2019-09-28 12:27:53 +10:00
Nigel Stewart
68135131a9 Resolve visualinfo and glewinfo link warnings for vc15 build 2019-09-28 11:54:27 +10:00
Nigel Stewart
b374d9ad93 Fix vc15 release build memset link problem for v142 toolchains 2019-09-28 11:45:01 +10:00
Gyusun Yeom
f1a95440ea Generate Sources of origin/master updated at Sat Feb 2 17:45:50 GMT 2019 2019-02-03 02:45:50 +09:00
Gyusun Yeom
b2ea0143bd Merge https://github.com/nigels-com/glew.git into master HEAD at Sat Feb 2 17:44:17 GMT 2019 2019-02-03 02:44:17 +09:00
Nigel Stewart
44049b7de2 FreeBSD cmake fixup for locating X11 include and lib 2019-02-02 09:23:01 +10:00
Gyusun Yeom
82e4802538 Merge https://github.com/nigels-com/glew.git into master HEAD at Sat Dec 29 17:44:16 GMT 2018 2018-12-30 02:44:16 +09:00
Danilo Spinella
c63cdf976d Add GLEW_EGL in cmake build 2018-12-29 20:21:23 +10:00
Gyusun Yeom
679246fadb Merge https://github.com/nigels-com/glew.git into master HEAD at Sat Oct 13 17:44:15 GMT 2018 2018-10-14 02:44:15 +09:00
Nigel Stewart
8b2d34956c Conditional cmake policy CMP0003 and CMP0042 2018-10-13 14:07:01 +10:00
Gyusun Yeom
5bb183155b Generate Sources of origin/master updated at Wed Oct 10 17:45:43 GMT 2018 2018-10-11 02:45:43 +09:00
Gyusun Yeom
6755e0fcac Merge https://github.com/nigels-com/glew.git into master HEAD at Wed Oct 10 17:44:15 GMT 2018 2018-10-11 02:44:15 +09:00
dimitri
b7c40325c7 Removed conan configuration. 2018-10-10 11:01:48 +10:00
Gyusun Yeom
4fbb8fe14a Generate Sources of origin/master updated at Thu Jun 21 12:01:56 GMT 2018 2018-06-21 21:01:56 +09:00
Gyusun Yeom
f43a19ea26 Merge https://github.com/nigels-com/glew.git into master HEAD at Thu Jun 21 12:01:11 GMT 2018 2018-06-21 21:01:11 +09:00
dimitri
e544f8c12d Correction for conan v1.0.0 2018-01-13 11:50:10 +10:00
dimitri
ef0e1c4d3a Still avoiding 32-bit builds online, even though they work locally. 2018-01-13 11:50:10 +10:00
dimitri
1cdf352217 Building 32-bit binaries on 64-bit linux machines now supported. 2018-01-13 11:50:10 +10:00
Olli Kallioinen
f5f69b25eb Fix for issue #169 (glew cmake project requires a c++ compiler) 2017-12-30 09:25:54 +10:00
dimitri
871bb6601b Still avoiding 32-bit builds online, even though they work locally. 2017-11-19 09:17:22 +10:00
dimitri
0b396919e6 Building 32-bit binaries on 64-bit linux machines now supported. 2017-11-19 09:17:22 +10:00
wiranoid
ee3026486f Add Visual Studio 2015 and 2017 project files 2017-11-19 09:16:38 +10:00
dimitri
1579119716 Removed replace_in_file from imports. 2017-11-05 21:52:42 +10:00
dimitri
a30e00892a No longer need conanfile string replacement for win gcc. 2017-11-05 21:52:42 +10:00
Steve Robinson
07b759b784 The install_manifest.txt is actually in the top-level binary directory, not the project-specific binary directory. I get the CMake error 'Cannot find install manifest' if I've added the glew library as a subdirectory in my existing CMake project. 2017-10-09 21:10:58 +10:00
dimitri
1b1371ddcb Conan package test cmakelists cleanup. 2017-07-26 05:35:34 +02:00
dimitri
f8c6f9bffd Using standard args in FindGLEW. 2017-07-26 05:23:03 +02:00
dimitri
b194494aef No version and no username in test_package/conanfile.py 2017-07-25 05:50:18 +02:00
dimitri
58b23c29a7 Using exports_sources. 2017-07-24 23:01:06 +02:00
dimitri
fc5659148d Correction for conan mingw debug builds. 2017-07-21 17:40:11 +03:00
dimitri
fd281347f4 Copying .pdb files for Windows debug static builds. 2017-06-30 07:23:23 +02:00
dimitri
b7fbaec9b3 Support for building released versions added. 2017-06-27 06:01:39 +02:00
dimitri
cf469ab200 Added conan packaging support. 2017-06-27 05:59:43 +02:00