diff --git a/CMakeLists.txt b/CMakeLists.txt index ed30417..7c1da0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -535,34 +535,10 @@ if(ENABLE_QT) endif() -# find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the sudachi_find_package -if (ENABLE_SDL2 AND NOT USE_SDL2_FROM_EXTERNALS) - if (SUDACHI_USE_BUNDLED_SDL2) - # Detect toolchain and platform - if ((MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1940) AND ARCHITECTURE_x86_64) - set(SDL2_VER "SDL2-2.28.2") - else() - message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable SUDACHI_USE_BUNDLED_SDL2 and provide your own.") - endif() - - if (DEFINED SDL2_VER) - download_bundled_external("sdl2/" ${SDL2_VER} SDL2_PREFIX) - endif() - - set(SDL2_FOUND YES) - set(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include" CACHE PATH "Path to SDL2 headers") - set(SDL2_LIBRARY "${SDL2_PREFIX}/lib/x64/SDL2.lib" CACHE PATH "Path to SDL2 library") - set(SDL2_DLL_DIR "${SDL2_PREFIX}/lib/x64/" CACHE PATH "Path to SDL2.dll") - - add_library(SDL2::SDL2 INTERFACE IMPORTED) - target_link_libraries(SDL2::SDL2 INTERFACE "${SDL2_LIBRARY}") - target_include_directories(SDL2::SDL2 INTERFACE "${SDL2_INCLUDE_DIR}") - elseif (USE_SDL2_FROM_EXTERNALS) - message(STATUS "Using SDL2 from externals.") - else() - find_package(SDL2 2.26.4 REQUIRED) - endif() -endif() +# Nixos needs to use packaged SDL2. There is something up with these flags that +# doesn't currently work properly so here is a quick hack. I'd investigate and +# report to the dev, but you all are dicks who drove him out. Fuck you all. +find_package(SDL2 2.26.4 REQUIRED) if (UNIX AND NOT APPLE AND NOT ANDROID) find_package(PkgConfig REQUIRED)