Skip to content
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
2 changes: 1 addition & 1 deletion cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ hunter_default_version(RapidXML VERSION 1.13)
hunter_default_version(RedisClient VERSION 0.6.1-p1)
hunter_default_version(SDL2 VERSION 2.0.12-p0)
hunter_default_version(SDL_image VERSION 2.0.5-p0)
hunter_default_version(SDL_mixer VERSION 2.0.2-p0)
hunter_default_version(SDL_mixer VERSION 2.0.4-p0)
hunter_default_version(SDL_net VERSION 2.0.1-p0)
hunter_default_version(SDL_ttf VERSION 2.0.15-p0)
hunter_default_version(SFML VERSION 2.5.1-p0)
Expand Down
19 changes: 15 additions & 4 deletions cmake/projects/SDL_mixer/hunter.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,26 @@ include(hunter_download)
include(hunter_pick_scheme)
include(hunter_cacheable)

hunter_add_version(
PACKAGE_NAME
SDL_mixer
VERSION
"2.0.4-p0"
URL
"https://github.com/cpp-pm/SDL_mixer/archive/v2.0.4-p0.tar.gz"
SHA1
9c7758b4d40c846fa4de8accb0715bd1dd8cb295
)

hunter_add_version(
PACKAGE_NAME
SDL_mixer
VERSION
"2.0.1-p1"
URL
"https://github.com/hunter-packages/SDL_mixer/archive/v2.0.1-p1.tar.gz"
"https://github.com/cpp-pm/SDL_mixer_legacy/archive/v2.0.1-p1.tar.gz"
SHA1
b4e97fb430309d5218185afa702f16f0129678be
dfd76b131f51e97054b48d2e803256618d6e1f21
)

hunter_add_version(
Expand All @@ -23,9 +34,9 @@ hunter_add_version(
VERSION
"2.0.2-p0"
URL
"https://github.com/hunter-packages/SDL_mixer/archive/v2.0.2-p0.tar.gz"
"https://github.com/cpp-pm/SDL_mixer_legacy/archive/v2.0.2-p0.tar.gz"
SHA1
a5c33841d5546611dd707a24553e9bf22cbc24f4
0f6e566ec3e1fb02c35d74ac811ea24072e40424
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
Expand Down
2 changes: 1 addition & 1 deletion docs/packages/pkg/SDL_mixer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SDL_mixer
=========

- `Official <https://www.libsdl.org/projects/SDL_mixer/>`__
- `Hunterized <https://github.com/hunter-packages/SDL_mixer>`__
- `Hunterized <https://github.com/cpp-pm/SDL_mixer>`__
- `Example <https://github.com/cpp-pm/hunter/blob/master/examples/SDL_mixer/CMakeLists.txt>`__
- Available since `v0.19.56 <https://github.com/cpp-pm/hunter/releases/tag/v0.19.56>`__
- Added by `wheybags <https://github.com/wheybags>`__ (`pr-924 <https://github.com/ruslo/hunter/pull/924>`__)
Expand Down
21 changes: 19 additions & 2 deletions examples/SDL_mixer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required (VERSION 3.0)

set(HUNTER_USE_CACHE_SERVERS NO)

# Emulate HunterGate:
# * https://github.com/hunter-packages/gate
include("../common.cmake")
Expand All @@ -9,7 +11,22 @@ project(SDL_mixer-test)
hunter_add_package(SDL_mixer)
find_package(SDL_mixer CONFIG REQUIRED)

add_executable(main main.cpp)
if(ANDROID)
add_library(main SHARED main.cpp)
else()
add_executable(main main.cpp)
endif()

# Fix MinGW / MSYS build
if(MINGW OR MSYS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector")
target_link_libraries(main
mingw32
)
endif()

target_link_libraries(main
SDL_mixer::SDL_mixer
SDL2::SDL2main)
SDL2::SDL2main
SDL2::SDL2)