Reorganize sdl2 config

This commit is contained in:
Alexander Batalov 2022-05-28 08:24:55 +03:00
parent 456fd43d8a
commit 40a43422a3
2 changed files with 5 additions and 2 deletions

View File

@ -251,3 +251,5 @@ target_link_libraries(fallout2-ce ${ZLIB_LIBRARIES})
target_include_directories(fallout2-ce PRIVATE ${ZLIB_INCLUDE_DIRS})
add_subdirectory("third_party/sdl2")
target_link_libraries(fallout2-ce ${SDL2_LIBRARIES})
target_include_directories(fallout2-ce PRIVATE ${SDL2_INCLUDE_DIRS})

View File

@ -19,5 +19,6 @@ if (NOT sdl2_POPULATED)
endif()
add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR} EXCLUDE_FROM_ALL)
target_include_directories(fallout2-ce PUBLIC ${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR})
target_link_libraries(fallout2-ce SDL2-static SDL2::SDL2main)
set(SDL2_INCLUDE_DIRS ${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR} PARENT_SCOPE)
set(SDL2_LIBRARIES SDL2-static SDL2::SDL2main PARENT_SCOPE)