Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenGL-Registry package (Headers only) #424

Merged
merged 1 commit into from Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,8 @@
#include <GL/glcorearb.h>

#include <iostream>

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