Skip to content

Commit

Permalink
Fix an import library is treated as a static library on OS/2
Browse files Browse the repository at this point in the history
On OS/2, a suffix of an import library is '_dll.a', and a suffix of
a static library is '.a'.

Because of this, an import library is treated as a static library in
get_target_properties_from_pkg_config().
  • Loading branch information
komh authored and derselbst committed Apr 23, 2024
1 parent 619fc5c commit b69c9a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake_admin/PkgConfigHelpers.cmake
Expand Up @@ -76,7 +76,8 @@ macro ( unset_pkg_config _prefix )
endmacro ( unset_pkg_config )

function ( get_target_properties_from_pkg_config _library _prefix _out_prefix )
if ( "${_library}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$" )
if ( NOT "${_library}" MATCHES "${CMAKE_IMPORT_LIBRARY_SUFFIX}$"
AND "${_library}" MATCHES "${CMAKE_STATIC_LIBRARY_SUFFIX}$" )
set ( _cflags ${_prefix}_STATIC_CFLAGS_OTHER )
set ( _link_libraries ${_prefix}_STATIC_LIBRARIES )
set ( _library_dirs ${_prefix}_STATIC_LIBRARY_DIRS )
Expand Down

0 comments on commit b69c9a3

Please sign in to comment.