mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 17:36:25 +00:00
cmake: use correct suffix in PkgConfigHelper
(cherry picked from commit 0bbfbf5b37
)
This commit is contained in:
@@ -1,16 +1,21 @@
|
|||||||
# Helper for Find modules
|
# Helper for Find modules
|
||||||
|
|
||||||
function(get_flags_from_pkg_config _library _pc_prefix _out_prefix)
|
function(get_flags_from_pkg_config _library _pc_prefix _out_prefix)
|
||||||
if("${_library}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$")
|
if(MINGW)
|
||||||
set(_cflags ${_pc_prefix}_STATIC_CFLAGS_OTHER)
|
set(re_shared_suffix ".dll.a$")
|
||||||
set(_link_libraries ${_pc_prefix}_STATIC_LIBRARIES)
|
|
||||||
set(_link_options ${_pc_prefix}_STATIC_LDFLAGS_OTHER)
|
|
||||||
set(_library_dirs ${_pc_prefix}_STATIC_LIBRARY_DIRS)
|
|
||||||
else()
|
else()
|
||||||
|
set(re_shared_suffix "${CMAKE_SHARED_LIBRARY_SUFFIX}$")
|
||||||
|
endif()
|
||||||
|
if("${_library}" MATCHES "${re_shared_suffix}")
|
||||||
set(_cflags ${_pc_prefix}_CFLAGS_OTHER)
|
set(_cflags ${_pc_prefix}_CFLAGS_OTHER)
|
||||||
set(_link_libraries ${_pc_prefix}_LIBRARIES)
|
set(_link_libraries ${_pc_prefix}_LIBRARIES)
|
||||||
set(_link_options ${_pc_prefix}_LDFLAGS_OTHER)
|
set(_link_options ${_pc_prefix}_LDFLAGS_OTHER)
|
||||||
set(_library_dirs ${_pc_prefix}_LIBRARY_DIRS)
|
set(_library_dirs ${_pc_prefix}_LIBRARY_DIRS)
|
||||||
|
else()
|
||||||
|
set(_cflags ${_pc_prefix}_STATIC_CFLAGS_OTHER)
|
||||||
|
set(_link_libraries ${_pc_prefix}_STATIC_LIBRARIES)
|
||||||
|
set(_link_options ${_pc_prefix}_STATIC_LDFLAGS_OTHER)
|
||||||
|
set(_library_dirs ${_pc_prefix}_STATIC_LIBRARY_DIRS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# The *_LIBRARIES lists always start with the library itself
|
# The *_LIBRARIES lists always start with the library itself
|
||||||
|
Reference in New Issue
Block a user