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 'Alut' package #742

Merged
merged 1 commit into from
May 15, 2024
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.
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 @@ -17,6 +17,7 @@ include(hunter_user_error)

hunter_default_version(ARM_NEON_2_x86_SSE VERSION 1.0.0-p0)
hunter_default_version(AllTheFlopsThreads VERSION 0.1-p0)
hunter_default_version(Alut VERSION 1.1.0-469287b-p0)
hunter_default_version(Android-Apk VERSION 1.1.14)
hunter_default_version(Android-Build-Tools VERSION 27.0.3)
hunter_default_version(Android-Google-Repository VERSION 58)
Expand Down
27 changes: 27 additions & 0 deletions cmake/projects/Alut/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
include(hunter_add_version)
include(hunter_cacheable)
include(hunter_cmake_args)
include(hunter_download)
include(hunter_pick_scheme)

hunter_add_version(
PACKAGE_NAME
Alut
VERSION
1.1.0-469287b-p0
URL
"https://github.com/cpp-pm/freealut/archive/1.1.0-469287b-p0.tar.gz"
SHA1
c20f2c026bb48d9e6ade42051c998797b0b723b6
)

hunter_cmake_args(
Alut
CMAKE_ARGS
BUILD_EXAMPLES=OFF
BUILD_TESTS=OFF
)

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

Alut

.. index::
single: media ; Alut

.. _pkg.Alut:

Alut
====

- `Official <https://github.com/vancegroup/freealut>`__
- `Hunterized <https://github.com/cpp-pm/freealut>`__
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/Alut/CMakeLists.txt>`__
- Added by `drodin <https://github.com/drodin>`__ (`pr-742 <https://github.com/cpp-pm/hunter/pull/742>`__)

.. literalinclude:: /../examples/Alut/CMakeLists.txt
:language: cmake
:start-after: # DOCUMENTATION_START {
:end-before: # DOCUMENTATION_END }
15 changes: 15 additions & 0 deletions examples/Alut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.5)

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

project(download-Alut)

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

add_executable(main main.cpp)
target_link_libraries(main PUBLIC Alut::alut)
# DOCUMENTATION_END }
16 changes: 16 additions & 0 deletions examples/Alut/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <stdlib.h>
#include <AL/alut.h>

int
main (int argc, char **argv)
{
ALuint helloBuffer, helloSource;
alutInit (&argc, argv);
helloBuffer = alutCreateBufferHelloWorld ();
alGenSources (1, &helloSource);
alSourcei (helloSource, AL_BUFFER, helloBuffer);
alSourcePlay (helloSource);
alutSleep (1);
alutExit ();
return EXIT_SUCCESS;
}
Loading