Fix SDL
This commit is contained in:
parent
199a3636a5
commit
35afe7722f
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
[submodule "external/SDL"]
|
||||
path = external/SDL
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
branch = release-2.32.x
|
||||
@ -20,7 +20,12 @@ if(EMSCRIPTEN)
|
||||
)
|
||||
else()
|
||||
# Native platform
|
||||
find_package(SDL2 REQUIRED)
|
||||
target_include_directories(PortalGame PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||
target_link_libraries(PortalGame PRIVATE ${SDL2_LIBRARIES})
|
||||
# find_package(SDL2 REQUIRED)
|
||||
# SDL2 build options to avoid unwanted components
|
||||
set(SDL_TEST OFF CACHE BOOL "" FORCE)
|
||||
set(SDL_SHARED OFF CACHE BOOL "" FORCE)
|
||||
set(SDL_STATIC ON CACHE BOOL "" FORCE)
|
||||
add_subdirectory(external/SDL)
|
||||
target_include_directories(PortalGame PRIVATE "external/SDL/include")
|
||||
target_link_libraries(PortalGame PRIVATE SDL2main SDL2-static)
|
||||
endif()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user