Remove sdl2-config script from cmake as discussed in #6352

This commit is contained in:
Daniel Diefenthaler 2021-12-12 14:58:11 +01:00 committed by Pentarctagon
parent eda8d05b2f
commit 82b54920d6

View file

@ -79,19 +79,8 @@ find_package(Gettext)
find_package(X11)
if(NOT WIN32)
# needed to get some SDL2 defines in... (as of rev31694 -D_GNU_SOURCE=1 is required!)
if(NOT MINGW)
set(SDL2_CONFIG "sdl2-config" CACHE STRING "Path to sdl2-config script")
exec_program(${SDL2_CONFIG} ARGS "--cflags" OUTPUT_VARIABLE SDL2_CFLAGS)
add_definitions(${SDL2_CFLAGS})
else()
# equivalent to sdl2-config --cflags --libs
# since cmake cannot execute sdl2-config in msys2 shell
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -I/mingw64/include/SDL2 -Dmain=SDL_main -L/mingw64/lib -lmingw32 -lSDL2main -lSDL2 -mwindows)
endif()
# Use the safer `mkstemp' instead of `tmpnam' on POSIX systems.
add_definitions(-DLUA_USE_POSIX)
# Use the safer `mkstemp' instead of `tmpnam' on POSIX systems.
add_definitions(-DLUA_USE_POSIX)
endif()
#check for some compiler/arch specific things and export defines accordingly...