diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 5c38acdf89..cb4e523295 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -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) diff --git a/cmake/projects/FreeGLUT/hunter.cmake b/cmake/projects/FreeGLUT/hunter.cmake new file mode 100644 index 0000000000..5f6a129312 --- /dev/null +++ b/cmake/projects/FreeGLUT/hunter.cmake @@ -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) diff --git a/docs/packages/pkg/FreeGLUT.rst b/docs/packages/pkg/FreeGLUT.rst new file mode 100644 index 0000000000..dae4fbeedb --- /dev/null +++ b/docs/packages/pkg/FreeGLUT.rst @@ -0,0 +1,21 @@ +.. spelling:: + + FreeGLUT + +.. index:: + single: unsorted ; FreeGLUT + +.. _pkg.FreeGLUT: + +FreeGLUT +======== + +- `Official `__ +- `Hunterized `__ +- `Example `__ +- Added by `Rahul Sheth `__ (`pr-448 `__) + +.. literalinclude:: /../examples/FreeGLUT/CMakeLists.txt + :language: cmake + :start-after: # DOCUMENTATION_START { + :end-before: # DOCUMENTATION_END } diff --git a/examples/FreeGLUT/CMakeLists.txt b/examples/FreeGLUT/CMakeLists.txt new file mode 100644 index 0000000000..57fa00755d --- /dev/null +++ b/examples/FreeGLUT/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-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 } diff --git a/examples/FreeGLUT/boo.cpp b/examples/FreeGLUT/boo.cpp new file mode 100644 index 0000000000..48eb7bf6e2 --- /dev/null +++ b/examples/FreeGLUT/boo.cpp @@ -0,0 +1,5 @@ +#include + +int main() { + int window = glutGetWindow () ; +}