cmake: rename SDL_STATIC_LIBS -> SDL_PC_STATIC_LIBS

This commit is contained in:
Anonymous Maarten 2023-01-07 18:32:58 +01:00 committed by Anonymous Maarten
parent 2f1860cfc6
commit bffbfa572c
2 changed files with 6 additions and 7 deletions

View File

@ -2896,13 +2896,12 @@ endif()
# Clean up the different lists # Clean up the different lists
listtostr(EXTRA_LIBS _EXTRA_LIBS "-l") listtostr(EXTRA_LIBS _EXTRA_LIBS "-l")
set(SDL_STATIC_LIBS ${EXTRA_LDFLAGS} ${_EXTRA_LIBS}) set(SDL_PC_STATIC_LIBS ${EXTRA_LDFLAGS} ${_EXTRA_LIBS})
list(REMOVE_DUPLICATES SDL_STATIC_LIBS) list(REMOVE_DUPLICATES SDL_PC_STATIC_LIBS)
listtostr(SDL_STATIC_LIBS _SDL_STATIC_LIBS) listtostr(SDL_PC_STATIC_LIBS SDL_PC_STATIC_LIBS)
set(SDL_STATIC_LIBS ${_SDL_STATIC_LIBS})
listtostr(SDL_PC_LIBS SDL_PC_LIBS) listtostr(SDL_PC_LIBS SDL_PC_LIBS)
listtostr(SDL_PC_CFLAGS SDL_PC_CFLAGS) listtostr(SDL_PC_CFLAGS SDL_PC_CFLAGS)
string(REGEX REPLACE "-lSDL3( |$)" "-l${sdl_static_libname} " SDL_STATIC_LIBS "${SDL_STATIC_LIBS}") string(REGEX REPLACE "-lSDL3( |$)" "-l${sdl_static_libname} " SDL_PC_STATIC_LIBS "${SDL_PC_STATIC_LIBS}")
if(NOT SDL_SHARED) if(NOT SDL_SHARED)
string(REGEX REPLACE "-lSDL3( |$)" "-l${sdl_static_libname} " SDL_PC_LIBS "${SDL_PC_LIBS}") string(REGEX REPLACE "-lSDL3( |$)" "-l${sdl_static_libname} " SDL_PC_LIBS "${SDL_PC_LIBS}")
endif() endif()
@ -2913,7 +2912,7 @@ endif()
# message(STATUS "SDL_PC_CFLAGS: ${SDL_PC_CFLAGS}") # message(STATUS "SDL_PC_CFLAGS: ${SDL_PC_CFLAGS}")
# message(STATUS "SDL_PC_LIBS: ${SDL_PC_LIBS}") # message(STATUS "SDL_PC_LIBS: ${SDL_PC_LIBS}")
# message(STATUS "SDL_STATIC_LIBS: ${SDL_STATIC_LIBS}") # message(STATUS "SDL_PC_STATIC_LIBS: ${SDL_PC_STATIC_LIBS}")
configure_file(cmake/sdl3.pc.in sdl3.pc @ONLY) configure_file(cmake/sdl3.pc.in sdl3.pc @ONLY)

View File

@ -10,5 +10,5 @@ Description: Simple DirectMedia Layer is a cross-platform multimedia library des
Version: @SDL_VERSION@ Version: @SDL_VERSION@
Requires.private: @PKGCONFIG_DEPENDS@ Requires.private: @PKGCONFIG_DEPENDS@
Conflicts: Conflicts:
Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_PC_LIBS@ @PKGCONFIG_LIBS_PRIV@ @SDL_STATIC_LIBS@ Libs: -L${libdir} @SDL_RLD_FLAGS@ @SDL_PC_LIBS@ @PKGCONFIG_LIBS_PRIV@ @SDL_PC_STATIC_LIBS@
Cflags: -I${includedir} -I${includedir}/SDL3 @SDL_PC_CFLAGS@ Cflags: -I${includedir} -I${includedir}/SDL3 @SDL_PC_CFLAGS@