sdl2-cmake-scripts
sdl2-cmake-scripts copied to clipboard
CMake scripts for finding SDL2 headers and libraries on multiple platforms
When my CMakeLists.txt is this ``` cmake_minimum_required(VERSION 3.4) project(SDL-Tests) file(GLOB all_src "main.c") add_executable(sdl ${all_src}) set(CMAKE_C_COMPILER /usr/bin/gcc) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "#{PROJECT_SOURCE_DIR}/cmake") find_package(SDL2 REQUIRED) include_directories(${SDL2_INCLUDE_DIR}) target_link_libraries(sdl ${SDL2_LIBRARY}) ``` I get the following linker...
I have been using this set of scripts, and recently started using SDL_net so I added SDL_net to the set of supported SDL libraries and figured I would submit the...
I cannot use find_package on emscripten because threads are not yet supported in the browser by default. There is a SDL2 port for emscripten without threads, though. I think adding...
No other changes than `mixer` -> `net`.
Add SDL2_STATIC variable, when set to ON will link the static version of SDL2 and add any necessary libs and linker flags for linking it statically from pkg-config. For dynamic...