Revert "a"

This reverts commit 7bec44fc33.
This commit is contained in:
Alug committed 2025-12-07 17:11:30 +01:00
1 parent ade77c7b00
commit b2ae5679ca
4 files changed
+27 -33

No files matched your search

+20 -20
View File
@@ -1,43 +1,43 @@
# Find SDL3
# Find SDL2
# Once done, this will define
#
# SDL3_FOUND - system has SDL3
# SDL3_INCLUDE_DIRS - SDL3 include directories
# SDL3_LIBRARIES - link libraries
# SDL2_FOUND - system has SDL2
# SDL2_INCLUDE_DIRS - SDL2 include directories
# SDL2_LIBRARIES - link libraries
include(LibFindMacros)
libfind_pkg_check_modules(SDL3_PKGCONF SDL3)
libfind_pkg_check_modules(SDL2_PKGCONF SDL2)
# includes
find_path(SDL3_INCLUDE_DIR
find_path(SDL2_INCLUDE_DIR
NAMES SDL.h
PATHS
${SDL3_PKGCONF_INCLUDE_DIRS}
"/usr/include/SDL3"
"/usr/local/include/SDL3"
${SDL2_PKGCONF_INCLUDE_DIRS}
"/usr/include/SDL2"
"/usr/local/include/SDL2"
)
# library
find_library(SDL3_LIBRARY
NAMES SDL3
find_library(SDL2_LIBRARY
NAMES SDL2
PATHS
${SDL3_PKGCONF_LIBRARY_DIRS}
${SDL2_PKGCONF_LIBRARY_DIRS}
"/usr/lib"
"/usr/local/lib"
)
# set include dir variables
set(SDL3_PROCESS_INCLUDES SDL3_INCLUDE_DIR)
set(SDL3_PROCESS_LIBS SDL3_LIBRARY)
libfind_process(SDL3)
set(SDL2_PROCESS_INCLUDES SDL2_INCLUDE_DIR)
set(SDL2_PROCESS_LIBS SDL2_LIBRARY)
libfind_process(SDL2)
if(SDL3_FOUND AND NOT TARGET SDL3::SDL3)
add_library(SDL3::SDL3 UNKNOWN IMPORTED)
if(SDL2_FOUND AND NOT TARGET SDL2::SDL2)
add_library(SDL2::SDL2 UNKNOWN IMPORTED)
set_target_properties(
SDL3::SDL3
SDL2::SDL2
PROPERTIES
IMPORTED_LOCATION "${SDL3_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${SDL3_INCLUDE_DIR}"
IMPORTED_LOCATION "${SDL2_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}"
)
endif()
-2
View File
@@ -125,8 +125,6 @@ if(SRB2_CONFIG_ENABLE_DISCORDRPC)
target_sources(SRB2SDL2 PRIVATE discord.c)
endif()
target_sources(SRB2SDL2 PRIVATE stun.c)
if(${SRB2_CONFIG_LIBBACKTRACE})
target_link_libraries(SRB2SDL2 PRIVATE libbacktrace)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_LIBBACKTRACE)
+1 -1
View File
@@ -3,7 +3,7 @@ hw_draw.c
hw_main.cpp
hw_clip.c
hw_md2.c
hw_cache.cpp
hw_cache.c
hw_md2load.c
hw_md3load.c
hw_model.c
+6 -10
View File
@@ -51,14 +51,11 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES Darwin)
)
endif()
#if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}" AND NOT "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}")
# target_link_libraries(SRB2SDL2 PRIVATE SDL2::SDL2-static SDL2_mixer::SDL2_mixer-static)
#else()
# target_link_libraries(SRB2SDL2 PRIVATE SDL2::SDL2 SDL2_mixer::SDL2_mixer)
#endif()
target_sources(SRB2SDL2 PRIVATE sdl_sound.c)
target_link_libraries(SRB2SDL2 PRIVATE SDL3::SDL3 sndfile)
if(NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}" AND NOT "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}")
target_link_libraries(SRB2SDL2 PRIVATE SDL2::SDL2-static SDL2_mixer::SDL2_mixer-static)
else()
target_link_libraries(SRB2SDL2 PRIVATE SDL2::SDL2 SDL2_mixer::SDL2_mixer)
endif()
if("${CMAKE_SYSTEM_NAME}" MATCHES Linux)
target_link_libraries(SRB2SDL2 PRIVATE m rt)
@@ -73,8 +70,7 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES Windows)
)
endif()
#target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MIXER -DSOUND=SOUND_MIXER)
target_compile_definitions(SRB2SDL2 PRIVATE -DSOUND=SOUND_SDL)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_MIXER -DSOUND=SOUND_MIXER)
target_compile_definitions(SRB2SDL2 PRIVATE -DHAVE_SDL)
#### Installation ####