summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandre Bouvier <contact@amb.tf>2022-12-06 00:44:52 +0100
committerAlexandre Bouvier <contact@amb.tf>2022-12-06 01:26:30 +0100
commite6ae720c339f8ca97e0dbffe09f6c6b871bb82e0 (patch)
treebc1508702cbeb633a311c2d40530b0b7893aee36 /CMakeLists.txt
parentMerge pull request #9388 from lioncash/fix-msvc (diff)
downloadyuzu-e6ae720c339f8ca97e0dbffe09f6c6b871bb82e0.tar
yuzu-e6ae720c339f8ca97e0dbffe09f6c6b871bb82e0.tar.gz
yuzu-e6ae720c339f8ca97e0dbffe09f6c6b871bb82e0.tar.bz2
yuzu-e6ae720c339f8ca97e0dbffe09f6c6b871bb82e0.tar.lz
yuzu-e6ae720c339f8ca97e0dbffe09f6c6b871bb82e0.tar.xz
yuzu-e6ae720c339f8ca97e0dbffe09f6c6b871bb82e0.tar.zst
yuzu-e6ae720c339f8ca97e0dbffe09f6c6b871bb82e0.zip
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt16
1 files changed, 3 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e481984e4..914e391ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -433,23 +433,13 @@ if (ENABLE_SDL2)
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")
- add_library(SDL2 INTERFACE)
- target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}")
- target_include_directories(SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
+ add_library(SDL2::SDL2 INTERFACE IMPORTED)
+ target_link_libraries(SDL2::SDL2 INTERFACE "${SDL2_LIBRARY}")
+ target_include_directories(SDL2::SDL2 INTERFACE "${SDL2_INCLUDE_DIR}")
elseif (YUZU_USE_EXTERNAL_SDL2)
message(STATUS "Using SDL2 from externals.")
else()
find_package(SDL2 2.0.18 REQUIRED)
-
- # Some installations don't set SDL2_LIBRARIES
- if("${SDL2_LIBRARIES}" STREQUAL "")
- message(WARNING "SDL2_LIBRARIES wasn't set, manually setting to SDL2::SDL2")
- set(SDL2_LIBRARIES "SDL2::SDL2")
- endif()
-
- include_directories(SYSTEM ${SDL2_INCLUDE_DIRS})
- add_library(SDL2 INTERFACE)
- target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARIES}")
endif()
endif()