summaryrefslogtreecommitdiffstats
path: root/config/cmake/toolchain-target.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake/toolchain-target.cmake.in')
-rw-r--r--config/cmake/toolchain-target.cmake.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/config/cmake/toolchain-target.cmake.in b/config/cmake/toolchain-target.cmake.in
index d316db52c..cba2aaba4 100644
--- a/config/cmake/toolchain-target.cmake.in
+++ b/config/cmake/toolchain-target.cmake.in
@@ -20,9 +20,15 @@ SET(CMAKE_FIND_ROOT_PATH @SYSROOT@)
include_directories( @INCLUDE_DIRECTORIES@)
link_directories( @LINK_DIRECTORIES@)
+# toolchain wrappers handle the search directories implicitly
+LIST(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES @INCLUDE_DIRECTORIES@)
+LIST(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES @INCLUDE_DIRECTORIES@)
+LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES @LINK_DIRECTORIES@)
+
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)