Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(build): Fix regression in how cmake finds libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
nurupo committed Sep 25, 2017
1 parent 124c823 commit b7ef73d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ function(search_dependency pkg)
# Last, search for the library itself globally.
if(NOT ${pkg}_FOUND AND arg_LIBRARY)
find_library(${pkg}_LIBRARIES NAMES ${arg_LIBRARY})
find_path(${pkg}_INCLUDE_DIRS NAMES ${arg_HEADER})
if(${pkg}_LIBRARIES AND ${pkg}_INCLUDE_DIRS)
if(arg_HEADER)
find_path(${pkg}_INCLUDE_DIRS NAMES ${arg_HEADER})
endif()
if(${pkg}_LIBRARIES AND (${pkg}_INCLUDE_DIRS OR NOT arg_HEADER))
set(${pkg}_FOUND TRUE)
endif()
endif()
Expand Down

0 comments on commit b7ef73d

Please sign in to comment.