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)