revert findsdl2.cmake
This commit is contained in:
parent
bd734fb019
commit
d71942f7a4
|
@ -204,22 +204,21 @@ IF(SDL2_LIBRARY_TEMP)
|
|||
|
||||
# Add libsamplerate with vcpkg
|
||||
if(CMAKE_TOOLCHAIN_FILE MATCHES "vcpkg")
|
||||
find_package(SampleRate CONFIG REQUIRED)
|
||||
if(WIN32)
|
||||
unset(arch_suffix)
|
||||
unset(path_prefix)
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES -static)
|
||||
set(arch_suffix -static)
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^(Debug|RelWithDebInfo)$")
|
||||
set(path_prefix debug)
|
||||
endif()
|
||||
set(installed_prefix ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows${arch_suffix}/${path_prefix})
|
||||
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} SampleRate::samplerate)
|
||||
else()
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} SampleRate::samplerate)
|
||||
if(WIN32)
|
||||
unset(arch_suffix)
|
||||
unset(path_prefix)
|
||||
if(VCPKG_TARGET_TRIPLET MATCHES -static)
|
||||
set(arch_suffix -static)
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^(Debug|RelWithDebInfo)$")
|
||||
set(path_prefix debug)
|
||||
endif()
|
||||
set(installed_prefix ${_VCPKG_INSTALLED_DIR}/${WINARCH}-windows${arch_suffix}/${path_prefix})
|
||||
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${installed_prefix}/lib/samplerate.lib)
|
||||
else()
|
||||
SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} -lsamplerate)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Add some stuff from pkg-config, if available
|
||||
|
@ -261,4 +260,4 @@ ENDIF(SDL2_LIBRARY_TEMP)
|
|||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
Loading…
Reference in New Issue