Commit 22f260bb authored by Dominik Charousset's avatar Dominik Charousset

Support source dir as `LIBCAF_ROOT_DIR`

parent 96a251b3
...@@ -31,8 +31,9 @@ foreach (comp ${Libcaf_FIND_COMPONENTS}) ...@@ -31,8 +31,9 @@ foreach (comp ${Libcaf_FIND_COMPONENTS})
# look for headers: give CMake hints where to find non-installed CAF versions # look for headers: give CMake hints where to find non-installed CAF versions
# note that we look for the headers of each component individually: this is # note that we look for the headers of each component individually: this is
# necessary to support non-installed versions of CAF, i.e., accessing the # necessary to support non-installed versions of CAF, i.e., accessing the
# checked out "actor-framework" or "caf" directory structure directly # checked out "actor-framework" or "caf" directory structure directly;
unset(HDRHINT) # also check whether LIBCAF_ROOT_DIR is a source directory
set(HDRHINT "${LIBCAF_ROOT_DIR}/libcaf_${comp}")
foreach(dir ".." "../.." "../../..") foreach(dir ".." "../.." "../../..")
foreach(subdir "actor-framework" "caf") foreach(subdir "actor-framework" "caf")
set(HDRHINT ${HDRHINT} "${dir}/${subdir}/libcaf_${comp}") set(HDRHINT ${HDRHINT} "${dir}/${subdir}/libcaf_${comp}")
...@@ -78,6 +79,7 @@ foreach (comp ${Libcaf_FIND_COMPONENTS}) ...@@ -78,6 +79,7 @@ foreach (comp ${Libcaf_FIND_COMPONENTS})
"caf_${comp}" "caf_${comp}"
HINTS HINTS
${LIBCAF_ROOT_DIR}/lib ${LIBCAF_ROOT_DIR}/lib
${LIBCAF_ROOT_DIR}/build/lib
/usr/lib /usr/lib
/usr/local/lib /usr/local/lib
/opt/local/lib /opt/local/lib
...@@ -100,6 +102,7 @@ find_package_handle_standard_args(Libcaf ...@@ -100,6 +102,7 @@ find_package_handle_standard_args(Libcaf
FOUND_VAR LIBCAF_FOUND FOUND_VAR LIBCAF_FOUND
REQUIRED_VARS LIBCAF_LIBRARIES LIBCAF_INCLUDE_DIRS REQUIRED_VARS LIBCAF_LIBRARIES LIBCAF_INCLUDE_DIRS
HANDLE_COMPONENTS) HANDLE_COMPONENTS)
# final step to tell CMake we're done # final step to tell CMake we're done
mark_as_advanced(LIBCAF_ROOT_DIR mark_as_advanced(LIBCAF_ROOT_DIR
LIBCAF_LIBRARIES LIBCAF_LIBRARIES
......
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