This repository has been archived by the owner on Apr 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 650
Add glbinding 2.1.3-p0 package #1073
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# !!! DO NOT PLACE HEADER GUARDS HERE !!! | ||
|
||
# Load used modules | ||
include(hunter_add_version) | ||
include(hunter_cacheable) | ||
include(hunter_download) | ||
include(hunter_pick_scheme) | ||
include(hunter_cmake_args) | ||
|
||
# List of versions here... | ||
|
||
hunter_add_version( | ||
PACKAGE_NAME | ||
glbinding | ||
VERSION | ||
"2.1.3-p0" | ||
URL | ||
"https://github.com/hunter-packages/glbinding/archive/v2.1.3-p0.tar.gz" | ||
SHA1 | ||
7bb774ee35f63e7f769d4f4ae6194cbc3f8afe16 | ||
) | ||
|
||
hunter_cmake_args( | ||
glbinding | ||
CMAKE_ARGS | ||
BUILD_SHARED_LIBS=OFF | ||
OPTION_BUILD_TESTS=OFF | ||
OPTION_BUILD_GPU_TESTS=OFF | ||
OPTION_BUILD_EXAMPLES=OFF | ||
OPTION_BUILD_TOOLS=OFF | ||
OPTION_BUILD_DOCS=OFF | ||
HUNTER_INSTALL_LICENSE_FILES=LICENSE | ||
) | ||
|
||
# Pick a download scheme | ||
hunter_pick_scheme(DEFAULT url_sha1_cmake) # use scheme for cmake projects | ||
hunter_cacheable(glbinding) | ||
|
||
# Download package. | ||
# Two versions of library will be build by default: | ||
hunter_download(PACKAGE_NAME glbinding) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. spelling:: | ||
|
||
glbinding | ||
|
||
.. index:: ui ; glbinding | ||
|
||
.. _pkg.glbinding: | ||
|
||
glbinding | ||
========= | ||
|
||
- `Official <https://github.com/cginternals/glbinding>`__ | ||
- `Hunterized <https://github.com/hunter-packages/glbinding>`__ | ||
- `Example <https://github.com/ruslo/hunter/blob/master/examples/glbinding/CMakeLists.txt>`__ | ||
- Added by `NeroBurner <https://github.com/NeroBurner>`__ (`pr-1073 <https://github.com/ruslo/hunter/pull/1073>`__) | ||
|
||
.. code-block:: cmake | ||
|
||
hunter_add_package(glbinding) | ||
find_package(glbinding CONFIG REQUIRED) | ||
target_link_libraries(glbinding glbinding::glbinding) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright (c) 2017, NeroBurner | ||
# All rights reserved. | ||
|
||
cmake_minimum_required(VERSION 3.1) | ||
|
||
# Emulate HunterGate: | ||
# * https://github.com/hunter-packages/gate | ||
include("../common.cmake") | ||
|
||
project(download-glbinding) | ||
|
||
hunter_add_package(glbinding) | ||
|
||
string(COMPARE EQUAL "${glbinding_LICENSES}" "" is_empty) | ||
if(is_empty) | ||
message(FATAL_ERROR "Licenses not found") | ||
endif() | ||
|
||
message("glbinding licenses:") | ||
foreach(x ${glbinding_LICENSES}) | ||
message("* ${x}") | ||
if(NOT EXISTS "${glbinding_LICENSES}") | ||
message(FATAL_ERROR "File not found") | ||
endif() | ||
endforeach() | ||
|
||
find_package(glbinding CONFIG REQUIRED) | ||
|
||
# Test double library creation | ||
find_package(glbinding CONFIG REQUIRED) | ||
|
||
add_executable(foo foo.cpp) | ||
target_link_libraries(foo glbinding::glbinding) | ||
|
||
# glbinding needs at least this c++11 feature | ||
target_compile_features(foo PRIVATE cxx_defaulted_move_initializers) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include <glbinding/Version.h> | ||
#include <iostream> | ||
|
||
int main() | ||
{ | ||
std::cout << "Latest available gl version: " | ||
<< glbinding::Version::latest() | ||
<< std::endl; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C++11 will be added by toolchain. Not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep something in for future reference. When someone is using this package in his project he will need to enable this compile-feature or C++11. Not everyone is using a toolchain to enable C++11