From 6bd1a26375708e8f3fbd2b4b564b6b2b1c1c35eb Mon Sep 17 00:00:00 2001 From: Marcel Metz Date: Sat, 2 Apr 2016 10:35:50 +0200 Subject: [PATCH 1/4] CMake: Use GNUInstallDirs variables for pkg-config --- build/cmake/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index 5388b18..24d349d 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -178,10 +178,9 @@ if (BUILD_UTILS) endif () set (prefix ${CMAKE_INSTALL_PREFIX}) -set (exec_prefix \${prefix}) -set (libdir \${prefix}/lib) -set (includedir \${prefix}/include) -set (includedir \${prefix}/include) +set (exec_prefix ${CMAKE_INSTALL_PREFIX}) +set (libdir ${CMAKE_INSTALL_FULL_LIBDIR}) +set (includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) set (version ${GLEW_VERSION}) set (libname ${GLEW_LIB_NAME}) set (cflags) From 24bcf04c194545bc3417d6970eecb3c01a853a69 Mon Sep 17 00:00:00 2001 From: Marcel Metz Date: Sat, 2 Apr 2016 10:35:50 +0200 Subject: [PATCH 2/4] CMake: Use GNUInstallDirs variables for MacOSX framework destination --- build/cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index 24d349d..ef1a564 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -149,7 +149,7 @@ install ( TARGETS ${targets_to_install} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - FRAMEWORK DESTINATION lib${LIB_SUFFIX} + FRAMEWORK DESTINATION ${CMAKE_INSTALL_PREFIX} ) if (BUILD_UTILS) From 8ca90d2cf1cec784a0fdc80bf95dbcfb1257c4ae Mon Sep 17 00:00:00 2001 From: Marcel Metz Date: Sun, 3 Apr 2016 10:08:57 +0200 Subject: [PATCH 3/4] CMake: Document available targets and variables. --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 9c89385..99cea34 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,24 @@ RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel g $ cmake ./cmake $ make -j4 +| Target | Description | +| ---------- | ----------- | +| glew | Build the glew shared library. | +| glew_s | Build the glew static library. | +| glewinfo | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). | +| visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). | +| install | Install all enabled targts into `CMAKE_INSTALL_PREFIX`. | +| clean | Clean up build artifacts. | +| all | Build all enabled targets (default target). | + +| Variables | Description | +| --------------- | ----------- | +| BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. | +| GLEW_REGAL | Add the Regal project as dependency. | +| GLEW_OSMESA | Add the OSMesa project as dependency. | +| BUILD_FRAMEWORK | Build glew as MacOSX Framework. When setting this you should set also `CMAKE_INSTALL_PREFIX` to a sensible install location like `/Library/Frameworks`. | + + ### Windows #### Visual Studio From be51b869a1e90cacce81f85e2009e42c41fea105 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sun, 3 Apr 2016 20:03:16 +1000 Subject: [PATCH 4/4] CMake: Documentation touch-ups --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 99cea34..d944f77 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of *GLEW 2.0.0 release candidate, Core context, EGL support, no MX* [glew-20160131.tgz](http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20160131.tgz/download) -*GLEW 2.0.0 release candidate: Core context support, MX discontinued* +*GLEW 2.0.0 release candidate: Core context support, no MX* [glew-20151117.tgz](http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20151117.tgz/download) @@ -78,17 +78,16 @@ RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel g | glew_s | Build the glew static library. | | glewinfo | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). | | visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). | -| install | Install all enabled targts into `CMAKE_INSTALL_PREFIX`. | +| install | Install all enabled targets into `CMAKE_INSTALL_PREFIX`. | | clean | Clean up build artifacts. | | all | Build all enabled targets (default target). | | Variables | Description | | --------------- | ----------- | | BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. | -| GLEW_REGAL | Add the Regal project as dependency. | -| GLEW_OSMESA | Add the OSMesa project as dependency. | -| BUILD_FRAMEWORK | Build glew as MacOSX Framework. When setting this you should set also `CMAKE_INSTALL_PREFIX` to a sensible install location like `/Library/Frameworks`. | - +| GLEW_REGAL | Build in Regal mode. | +| GLEW_OSMESA | Build in off-screen Mesa mode. | +| BUILD_FRAMEWORK | Build as MacOSX Framework. Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. | ### Windows