Skip to content

Commit e97edec

Browse files
committed
cmake: support find_package(SDL3_mixer) using SDL3_mixer from a build directory
1 parent 39d11cd commit e97edec

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,6 +1184,8 @@ if(SDLMIXER_INSTALL)
11841184
COMPONENT devel
11851185
)
11861186

1187+
export(TARGETS ${sdl3_mixer_target_name} ${INSTALL_EXTRA_TARGETS} NAMESPACE "SDL3_mixer::" FILE "${sdl3_mixer_target_name}-targets.cmake")
1188+
11871189
if(SDLMIXER_RELOCATABLE)
11881190
file(RELATIVE_PATH SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG "${CMAKE_INSTALL_PREFIX}/${SDLMIXER_PKGCONFIG_INSTALLDIR}" "${CMAKE_INSTALL_PREFIX}")
11891191
string(REGEX REPLACE "[/]+$" "" SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG "${SDL_PATH_PREFIX_RELATIVE_TO_PKGCONFIG}")

cmake/SDL3_mixerConfig.cmake.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,8 @@ if(NOT TARGET SDL3_mixer::SDL3_mixer)
154154
endif()
155155
endif()
156156

157+
if(NOT SDL3_mixer_COMPONENTS AND NOT TARGET SDL3_mixer::SDL3_mixer-shared AND NOT TARGET SDL3_mixer::SDL3_mixer-static)
158+
set(SDL3_image_FOUND FALSE)
159+
endif()
157160
@PACKAGE_INIT@
158161
check_required_components(SDL3_mixer)

external/ogg

Submodule ogg updated 1 file

0 commit comments

Comments
 (0)