[Build/MacOS] Add SDL2 framework
This commit is contained in:
6
third_party/CMakeLists.txt
vendored
6
third_party/CMakeLists.txt
vendored
@@ -431,6 +431,12 @@ if(WIN32)
|
||||
)
|
||||
target_include_directories(SDL2 PUBLIC SDL2/include)
|
||||
target_link_libraries(SDL2 PRIVATE setupapi winmm imm32 version)
|
||||
elseif(APPLE)
|
||||
# Use system SDL2 framework on macOS
|
||||
add_library(SDL2 INTERFACE)
|
||||
find_library(SDL2_LIBRARY SDL2 REQUIRED)
|
||||
target_include_directories(SDL2 INTERFACE "${SDL2_LIBRARY}/Headers")
|
||||
target_link_libraries(SDL2 INTERFACE "${SDL2_LIBRARY}")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
# Use system SDL2 on Linux
|
||||
add_library(SDL2 INTERFACE)
|
||||
|
||||
Reference in New Issue
Block a user