mirror of
https://github.com/love2d/megasource.git
synced 2026-08-20 04:30:45 +02:00
Re-apply megasource changes to SDL's cmake file
This commit is contained in:
@@ -333,6 +333,8 @@ if(VITA)
|
||||
set(SDL_LOADSO_ENABLED_BY_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
|
||||
# When defined, respect CMake's BUILD_SHARED_LIBS setting:
|
||||
set(SDL_STATIC_ENABLED_BY_DEFAULT ON)
|
||||
if (NOT DEFINED SDL_SHARED_ENABLED_BY_DEFAULT)
|
||||
@@ -1518,6 +1520,8 @@ elseif(WINDOWS)
|
||||
endif()
|
||||
set(HAVE_SDL_MISC TRUE)
|
||||
|
||||
set(SDL_LINK_DIR ${PARENT_SCOPE})
|
||||
|
||||
# Check for DirectX
|
||||
if(SDL_DIRECTX)
|
||||
if(DEFINED MSVC_VERSION AND NOT ${MSVC_VERSION} LESS 1700)
|
||||
@@ -1550,6 +1554,8 @@ elseif(WINDOWS)
|
||||
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
|
||||
endif()
|
||||
|
||||
link_directories(${SDL_LINK_DIR})
|
||||
|
||||
if(SDL_XINPUT)
|
||||
# xinput.h may need windows.h, but does not include it itself.
|
||||
check_c_source_compiles("
|
||||
@@ -2766,6 +2772,13 @@ if(SDL_STATIC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MEGA)
|
||||
if(SDL_SHARED)
|
||||
install(TARGETS SDL2 RUNTIME DESTINATION . LIBRARY DESTINATION .)
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
##### Tests #####
|
||||
|
||||
if(SDL_TEST)
|
||||
|
||||
Reference in New Issue
Block a user