1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(build): Fix regression in how cmake finds libraries

This commit is contained in:
Maxim Biro 2017-09-25 05:15:51 -04:00
parent 124c823983
commit b7ef73d401

View File

@ -60,8 +60,10 @@ function(search_dependency pkg)
# Last, search for the library itself globally. # Last, search for the library itself globally.
if(NOT ${pkg}_FOUND AND arg_LIBRARY) if(NOT ${pkg}_FOUND AND arg_LIBRARY)
find_library(${pkg}_LIBRARIES NAMES ${arg_LIBRARY}) find_library(${pkg}_LIBRARIES NAMES ${arg_LIBRARY})
if(arg_HEADER)
find_path(${pkg}_INCLUDE_DIRS NAMES ${arg_HEADER}) find_path(${pkg}_INCLUDE_DIRS NAMES ${arg_HEADER})
if(${pkg}_LIBRARIES AND ${pkg}_INCLUDE_DIRS) endif()
if(${pkg}_LIBRARIES AND (${pkg}_INCLUDE_DIRS OR NOT arg_HEADER))
set(${pkg}_FOUND TRUE) set(${pkg}_FOUND TRUE)
endif() endif()
endif() endif()