mirror of https://github.com/encounter/SDL.git
cmake: Use the correct directory structure for MinGW builds
This commit is contained in:
parent
e967f00271
commit
6301cfda95
|
@ -2658,7 +2658,7 @@ if(SDL_STATIC)
|
||||||
add_library(SDL2-static STATIC ${SOURCE_FILES})
|
add_library(SDL2-static STATIC ${SOURCE_FILES})
|
||||||
# alias target for in-tree builds
|
# alias target for in-tree builds
|
||||||
add_library(SDL2::SDL2-static ALIAS SDL2-static)
|
add_library(SDL2::SDL2-static ALIAS SDL2-static)
|
||||||
if (NOT SDL_SHARED OR NOT WIN32)
|
if (NOT SDL_SHARED OR NOT WIN32 OR MINGW)
|
||||||
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
|
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
|
||||||
# Note: Apparently, OUTPUT_NAME must really be unique; even when
|
# Note: Apparently, OUTPUT_NAME must really be unique; even when
|
||||||
# CMAKE_IMPORT_LIBRARY_SUFFIX or the like are given. Otherwise
|
# CMAKE_IMPORT_LIBRARY_SUFFIX or the like are given. Otherwise
|
||||||
|
@ -2702,7 +2702,7 @@ install(TARGETS ${_INSTALL_LIBS} EXPORT SDL2Targets
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||||
|
|
||||||
##### Export files #####
|
##### Export files #####
|
||||||
if (WINDOWS)
|
if (WINDOWS AND NOT MINGW)
|
||||||
set(PKG_PREFIX "cmake")
|
set(PKG_PREFIX "cmake")
|
||||||
else ()
|
else ()
|
||||||
set(PKG_PREFIX "${CMAKE_INSTALL_LIBDIR}/cmake/SDL2")
|
set(PKG_PREFIX "${CMAKE_INSTALL_LIBDIR}/cmake/SDL2")
|
||||||
|
@ -2743,11 +2743,11 @@ else()
|
||||||
set(SOPOSTFIX "")
|
set(SOPOSTFIX "")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT (WINDOWS OR CYGWIN OR MINGW))
|
if(NOT (WINDOWS OR CYGWIN) OR MINGW)
|
||||||
if(SDL_SHARED)
|
if(SDL_SHARED)
|
||||||
set(SOEXT ${CMAKE_SHARED_LIBRARY_SUFFIX}) # ".so", ".dylib", etc.
|
set(SOEXT ${CMAKE_SHARED_LIBRARY_SUFFIX}) # ".so", ".dylib", etc.
|
||||||
get_target_property(SONAME SDL2 OUTPUT_NAME)
|
get_target_property(SONAME SDL2 OUTPUT_NAME)
|
||||||
if(NOT ANDROID)
|
if(NOT ANDROID AND NOT MINGW)
|
||||||
install(CODE "
|
install(CODE "
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
|
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
|
||||||
\"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\"
|
\"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\"
|
||||||
|
|
Loading…
Reference in New Issue