-add basic search directories for the "Generic" platform

As reported on the mailing list, find_path/file/library/program() basically don't work
at all if CMAKE_FIND_ROOT_PATH is set and searching in the host system directories
is disabled. This patch adds /include, /lib and /bin to the search directories, so they
will be appended to CMAKE_FIND_ROOT_PATH so this will work for the "Generic" platform (embedded
systems without OS)

Alex
This commit is contained in:
Alex Neundorf 2010-04-14 22:09:19 +02:00
parent 33ddb23e67
commit d827b9f21d
1 changed files with 6 additions and 0 deletions

View File

@ -9,3 +9,9 @@
# (embedded) targets without operating system usually don't support shared libraries
SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
# To help the find_xxx() commands, set at least the following so CMAKE_FIND_ROOT_PATH
# works at least for some simple cases:
SET(CMAKE_SYSTEM_INCLUDE_PATH /include )
SET(CMAKE_SYSTEM_LIBRARY_PATH /lib )
SET(CMAKE_SYSTEM_PROGRAM_PATH /bin )