From 40a43422a3f79664e006e3f985762833a1aff86e Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sat, 28 May 2022 08:24:55 +0300 Subject: [PATCH] Reorganize sdl2 config --- CMakeLists.txt | 2 ++ third_party/sdl2/CMakeLists.txt | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50698bd..4cc7a1f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/third_party/sdl2/CMakeLists.txt b/third_party/sdl2/CMakeLists.txt index 8bfdb32..06e5b61 100644 --- a/third_party/sdl2/CMakeLists.txt +++ b/third_party/sdl2/CMakeLists.txt @@ -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)