Commit f8d7e1fd authored by Robert Schmidt's avatar Robert Schmidt

Findxran: exclude default paths, use hints

Some users copy libxran.so to a system directory (e.g., /usr/local/lib).
At the same time, we require xran_LOCATION to be set to find the build
directory. Use HINTS to prefer the location passed through
xran_LOCATION.

Also, use NO_DEFAULT_PATH to outright disallow global scope, to prevent
"accidentally" finding libxran.so in global scope (this is for
multi-user systems that are used in development, and where people have
different version of libxran for testing purposes). To still use
packages in e.g., /usr/local/, it would be possible to set xran_LOCATION
to this directory. (there is a problem that the version information will
likely not be read correctly, so this might not be enough)
parent 42a10e47
......@@ -83,12 +83,15 @@ find_path(xran_INCLUDE_DIR
xran_pkt.h
xran_pkt_up.h
xran_sync_api.h
PATHS ${xran_LOCATION}
PATH_SUFFIXES api
HINTS ${xran_LOCATION}
PATH_SUFFIXES api include
NO_DEFAULT_PATH
)
find_library(xran_LIBRARY
NAMES xran
PATHS ${xran_LOCATION}/build
HINTS ${xran_LOCATION}
PATH_SUFFIXES build api
NO_DEFAULT_PATH
)
if (NOT xran_LIBRARY)
message(FATAL_ERROR "could not detect xran build artifacts at ${xran_LOCATION}/build")
......
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