Unverified Commit 00cd0c38 authored by Harris Hancock's avatar Harris Hancock Committed by GitHub

Merge pull request #679 from intelfx/cmake-fix-search

cmake: drop NO_DEFAULT_PATHS when searching libraries
parents 7bf5915e df0fbbe3
......@@ -88,6 +88,12 @@ function(_capnp_import_pkg_config_target target)
PATHS ${${target}_LIBRARY_DIRS}
NO_DEFAULT_PATH
)
# If the installed version of Cap'n Proto is in a system location, pkg-config will not have filled
# in ${target}_LIBRARY_DIRS. To account for this, fall back to a regular search.
find_library(CapnProto_${target}_IMPORTED_LOCATION
NAMES ${target_name_shared} ${target_name_static} # prefer libfoo-version.so over libfoo.a
)
if(NOT CapnProto_${target}_IMPORTED_LOCATION)
# Not an error if the library doesn't exist -- we may have found a lite mode installation.
if(CapnProto_DEBUG)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment