1 From 65ba437ed5514dd5762a796d349ed5db49e40fe7 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Wed, 29 Jul 2015 21:26:16 +0200
4 Subject: [PATCH] platform-config.cmake: fix paths for cross-compilation
6 Headers and library paths in platform-config.cmake must take into
7 account ${CMAKE_FIND_ROOT_PATH} to work in cross-compilation.
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11 platform-config.cmake.in | 6 +++---
12 1 file changed, 3 insertions(+), 3 deletions(-)
14 diff --git a/platform-config.cmake.in b/platform-config.cmake.in
15 index 7fe35fe..78b5085 100644
16 --- a/platform-config.cmake.in
17 +++ b/platform-config.cmake.in
20 # propagate these properties from one build system to the other
21 set (platform_VERSION "@platform_VERSION_MAJOR@.@platform_VERSION_MINOR@")
22 -set (platform_INCLUDE_DIRS @platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)
23 +set (platform_INCLUDE_DIRS ${CMAKE_FIND_ROOT_PATH}/@platform_INCLUDE_DIRS@ ${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/include)
24 set (platform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
25 set (platform_LINKER_FLAGS "@platform_LINKER_FLAGS@")
26 set (platform_CONFIG_VARS "@platform_CONFIG_VARS@")
28 # libraries come from the build tree where this file was generated
30 - set (platform_LIBRARY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/platform.lib")
31 + set (platform_LIBRARY "${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/platform.lib")
33 - set (platform_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lplatform")
34 + set (platform_LIBRARY "-L${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lplatform")
36 set (platform_LIBRARIES ${platform_LIBRARY} "@platform_LIBRARIES@")
37 mark_as_advanced (platform_LIBRARY)