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 FreeGLUT package v3.2.1-349a23d-p0 #448

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ hunter_default_version(Expat VERSION 2.2.9-p0)
hunter_default_version(FLAC VERSION 1.3.3-p0)
hunter_default_version(FP16 VERSION 0.0.0-febbb1c-p0)
hunter_default_version(FakeIt VERSION 2.0.3)
hunter_default_version(FreeGLUT VERSION 3.2.1-349a23d-p0)
hunter_default_version(Fruit VERSION 3.1.1-p0)
hunter_default_version(FunctionalPlus VERSION 0.2-p0)
hunter_default_version(GPUImage VERSION 0.1.6-p9)
Expand Down
32 changes: 32 additions & 0 deletions cmake/projects/FreeGLUT/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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_cmake_args)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
PACKAGE_NAME
FreeGLUT
VERSION
3.2.1-349a23d-p0
URL
"https://github.com/cpp-pm/FreeGLUT/archive/refs/tags/v3.2.1-349a23d-p0.tar.gz"
SHA1
b2841bf9697185b8c29adb56bb01d7a5668e9741
)

hunter_cmake_args(
FreeGLUT
CMAKE_ARGS
FREEGLUT_BUILD_SHARED_LIBS=OFF
FREEGLUT_REPLACE_GLUT=ON
FREEGLUT_BUILD_DEMOS=OFF)

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

FreeGLUT

.. index::
single: unsorted ; FreeGLUT

.. _pkg.FreeGLUT:

FreeGLUT
========

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

.. literalinclude:: /../examples/FreeGLUT/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }
18 changes: 18 additions & 0 deletions examples/FreeGLUT/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-FreeGLUT)

# DOCUMENTATION_START {
hunter_add_package(FreeGLUT)
find_package(FreeGLUT CONFIG REQUIRED)

add_executable(boo boo.cpp)
target_link_libraries(boo PUBLIC FreeGLUT::freeglut_static)
# DOCUMENTATION_END }
5 changes: 5 additions & 0 deletions examples/FreeGLUT/boo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <GL/freeglut.h>

int main() {
int window = glutGetWindow () ;
}