Skip to content

Commit

Permalink
Add OpenGL-Registry package (Headers only) (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbsheth committed Jul 2, 2021
1 parent 27c5979 commit b71187d
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ hunter_default_version(OpenCL-cpp VERSION 2.0.10-p0)
hunter_default_version(OpenCV VERSION 4.1.1-p0)
hunter_default_version(OpenCV-Extra VERSION 4.1.1)
hunter_default_version(OpenEXR VERSION 3.0.1-p0)
hunter_default_version(OpenGL-Registry VERSION 0.0.0-d15191e-p0)
hunter_default_version(OpenNMTTokenizer VERSION 1.11.0-p1)
hunter_default_version(OpenSSL VERSION 1.1.1j)
hunter_default_version(OpenSceneGraph VERSION 3.6.3-p0)
Expand Down
24 changes: 24 additions & 0 deletions cmake/projects/OpenGL-Registry/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2016-2020, Rahul Sheth, Ruslan Baratov
# All rights reserved.

# !!! DO NOT PLACE HEADER GUARDS HERE !!!

include(hunter_add_version)
include(hunter_cacheable)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
PACKAGE_NAME
OpenGL-Registry
VERSION
0.0.0-d15191e-p0
URL
"https://github.com/cpp-pm/OpenGL-Registry/archive/refs/tags/v0.0.0-d15191e-p0.tar.gz"
SHA1
841544bab9789c589012780a3e6a3e3ff50bce16
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(OpenGL-Registry)
hunter_download(PACKAGE_NAME OpenGL-Registry)
21 changes: 21 additions & 0 deletions docs/packages/pkg/OpenGL-Registry.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. spelling::

OpenGL

.. index::
single: unsorted ; OpenGL-Registry

.. _pkg.OpenGL-Registry:

OpenGL-Registry
===============

- `Official <https://github.com/KhronosGroup/OpenGL-Registry>`__
- `Hunterized <https://github.com/cpp-pm/OpenGL-Registry>`__
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/OpenGL-Registry/CMakeLists.txt>`__
- Added by `Rahul Sheth <https://github.com/rbsheth>`__ (`pr-424 <https://github.com/cpp-pm/hunter/pull/424>`__)

.. literalinclude:: /../examples/OpenGL-Registry/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }
18 changes: 18 additions & 0 deletions examples/OpenGL-Registry/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2016-2020, Rahul Sheth, Ruslan Baratov
# All rights reserved.

cmake_minimum_required(VERSION 3.2)

# Emulate HunterGate:
# * https://github.com/hunter-packages/gate
include("../common.cmake")

project(download-OpenGL-Registry)

# DOCUMENTATION_START {
hunter_add_package(OpenGL-Registry)
find_package(OpenGL-Registry CONFIG REQUIRED)

add_executable(boo boo.cpp)
target_link_libraries(boo PUBLIC OpenGL::Registry-Headers)
# DOCUMENTATION_END }
8 changes: 8 additions & 0 deletions examples/OpenGL-Registry/boo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <GL/glcorearb.h>

#include <iostream>

int main() {
khronos_uint8_t test = 0;
std::cout << "testing: " << test << std::endl;
}

0 comments on commit b71187d

Please sign in to comment.