Explicitly specify .pc names, since the previous guess in CheckLib.cmake wasn't always right.

This fixes detection of at least libenet via pkg-config, and I think
libpng via pkg-config pulseaudio via direct detection.

Also remove the NOT APPLE from the shared libenet check, because there's
no reason for it.
This commit is contained in:
comex
2015-06-02 18:00:50 -04:00
parent 3243a21573
commit fd855758cc
2 changed files with 18 additions and 19 deletions

View File

@ -6,7 +6,7 @@ macro(_internal_message msg)
endif()
endmacro()
macro(check_lib var lib)
macro(check_lib var pc lib)
set(_is_required 0)
set(_is_quiet 0)
set(_arg_list ${ARGN})
@ -22,8 +22,7 @@ macro(check_lib var lib)
endforeach()
if(PKG_CONFIG_FOUND AND NOT ${var}_FOUND)
string(TOLOWER ${lib} lower_lib)
pkg_search_module(${var} QUIET ${lower_lib})
pkg_search_module(${var} QUIET ${pc})
endif()
if(${var}_FOUND)