mirror of https://github.com/encounter/SDL.git
cmake: always create SDL2::SDL2main target in autotools' cmake config script
This commit is contained in:
parent
dc2ef31c29
commit
5eb0f4328d
|
@ -62,6 +62,8 @@ string(REGEX REPLACE ";-L" ";" _sdl2_static_private_libdirs "${_sdl2_static_priv
|
||||||
if(_sdl2_libraries MATCHES ".*SDL2main.*")
|
if(_sdl2_libraries MATCHES ".*SDL2main.*")
|
||||||
list(INSERT SDL2_LIBRARIES 0 SDL2::SDL2main)
|
list(INSERT SDL2_LIBRARIES 0 SDL2::SDL2main)
|
||||||
list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main)
|
list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(_sdl2main_library ${SDL2_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2main${CMAKE_STATIC_LIBRARY_SUFFIX})
|
set(_sdl2main_library ${SDL2_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}SDL2main${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||||
if(EXISTS "${_sdl2main_library}")
|
if(EXISTS "${_sdl2main_library}")
|
||||||
set(SDL2MAIN_LIBRARY SDL2::SDL2main)
|
set(SDL2MAIN_LIBRARY SDL2::SDL2main)
|
||||||
|
@ -93,7 +95,6 @@ if(_sdl2_libraries MATCHES ".*SDL2main.*")
|
||||||
set(SDL2_SDL2main_FOUND FALSE)
|
set(SDL2_SDL2main_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
unset(_sdl2main_library)
|
unset(_sdl2main_library)
|
||||||
endif()
|
|
||||||
|
|
||||||
# Remove SDL2 since this is the "central" library
|
# Remove SDL2 since this is the "central" library
|
||||||
# Remove SDL2main since this will be provided by SDL2::SDL2main (if available)
|
# Remove SDL2main since this will be provided by SDL2::SDL2main (if available)
|
||||||
|
|
Loading…
Reference in New Issue