diff options
author | Brian Clinkenbeard <brianclinkenbeard@users.noreply.github.com> | 2020-02-11 04:56:33 +0100 |
---|---|---|
committer | Brian Clinkenbeard <brianclinkenbeard@users.noreply.github.com> | 2020-02-11 04:56:33 +0100 |
commit | 68043dd2337feab0b0ccc9868cd535b2254335ea (patch) | |
tree | bb97a502f85b24bb018a3f99c9e564fa09251ed2 /CMakeLists.txt | |
parent | Merge pull request #3372 from ReinUsesLisp/fix-back-stencil (diff) | |
download | yuzu-68043dd2337feab0b0ccc9868cd535b2254335ea.tar yuzu-68043dd2337feab0b0ccc9868cd535b2254335ea.tar.gz yuzu-68043dd2337feab0b0ccc9868cd535b2254335ea.tar.bz2 yuzu-68043dd2337feab0b0ccc9868cd535b2254335ea.tar.lz yuzu-68043dd2337feab0b0ccc9868cd535b2254335ea.tar.xz yuzu-68043dd2337feab0b0ccc9868cd535b2254335ea.tar.zst yuzu-68043dd2337feab0b0ccc9868cd535b2254335ea.zip |
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dc782e252..44ed4196d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,15 +151,16 @@ if (ENABLE_SDL2) set(SDL2_INCLUDE_DIR "${SDL2_PREFIX}/include" CACHE PATH "Path to SDL2 headers") set(SDL2_LIBRARY "${SDL2_PREFIX}/lib/x64/SDL2.lib" CACHE PATH "Path to SDL2 library") set(SDL2_DLL_DIR "${SDL2_PREFIX}/lib/x64/" CACHE PATH "Path to SDL2.dll") - else() - find_package(SDL2 REQUIRED) - endif() - if (SDL2_FOUND) - # TODO(yuriks): Make FindSDL2.cmake export an IMPORTED library instead add_library(SDL2 INTERFACE) target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}") target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}") + else() + find_package(SDL2 REQUIRED) + include_directories(${SDL2_INCLUDE_DIRS}) + + add_library(SDL2 INTERFACE) + target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARIES}") endif() else() set(SDL2_FOUND NO) |