diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-01-23 22:59:53 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-01-23 23:00:31 +0100 |
commit | 08fd9eb2f00b600e1951f34d6a9faf840355e491 (patch) | |
tree | 2a4158efb580560b3f584512c9d4d3512c441005 /config | |
parent | 608f8974179bef0cde9ce4e0f865996923ae40a6 (diff) | |
download | ptxdist-08fd9eb2f00b600e1951f34d6a9faf840355e491.tar.gz ptxdist-08fd9eb2f00b600e1951f34d6a9faf840355e491.tar.xz |
[toolchain-target.cmake] add include_ and link_directories
There are several cmake based packages out there that use
CHECK_INCLUDE_FILES to find include files.
The problem is, that cmake only looks in the implizid search
directories, but not in the additional ones. Even if
CMAKE_FIND_ROOT_PATH is defined and points to them. Further cmake
doesn't care about "-I" or "-isystem" in CPPFLAGS.
Our solution (I'm not into cmake, but I think it's a hacky one):
define:
- include_directories
- link_directories
This has one drawback for linking. cmake thinks the paths specified in
link_directories are "implicid" linker search path. But they aren't.
Fortunately cmake cares about '-L' in LDFLAGS so it links in the end.
:P
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/toolchain-target.cmake.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config/cmake/toolchain-target.cmake.in b/config/cmake/toolchain-target.cmake.in index dfa8b4a8d..eeb2e390e 100644 --- a/config/cmake/toolchain-target.cmake.in +++ b/config/cmake/toolchain-target.cmake.in @@ -13,6 +13,10 @@ SET(CMAKE_CXX_COMPILER @CXX@) # where is the target environment SET(CMAKE_FIND_ROOT_PATH @SYSROOT@) +# additional search directories +include_directories( @INCLUDE_DIRECTORIES@) +link_directories( @LINK_DIRECTORIES@) + # search for programs in the build host directories SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) |