revert findsdl2.cmake

This commit is contained in:
Squall-Leonhart 2024-01-24 11:56:45 +11:00
parent bd734fb019
commit d71942f7a4
1 changed files with 15 additions and 16 deletions

View File

@ -204,7 +204,6 @@ IF(SDL2_LIBRARY_TEMP)
# Add libsamplerate with vcpkg # Add libsamplerate with vcpkg
if(CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg") if(CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg")
find_package(SampleRate CONFIG REQUIRED)
if(WIN32) if(WIN32)
unset(arch_suffix) unset(arch_suffix)
unset(path_prefix) unset(path_prefix)
@ -216,9 +215,9 @@ IF(SDL2_LIBRARY_TEMP)
endif() endif()
set(installed_prefix ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows${arch_suffix}/${path_prefix}) set(installed_prefix ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows${arch_suffix}/${path_prefix})
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} SampleRate::samplerate) SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${installed_prefix}/lib/samplerate.lib)
else() else()
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} SampleRate::samplerate) SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} -lsamplerate)
endif() endif()
endif() endif()