1 From a6e25dba4b5c1d911a4644a0ca116abc642cd72a Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Thu, 30 Jul 2015 09:28:24 +0200
4 Subject: [PATCH] kodiplatform-config.cmake: fix for cross-compilation
6 Use CMAKE_FIND_ROOT_PATH in kodiplatform-config.cmake in order to make
7 it cross-compilation friendly.
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
12 kodiplatform-config.cmake.in | 6 +++---
13 2 files changed, 4 insertions(+), 4 deletions(-)
15 diff --git a/CMakeLists.txt b/CMakeLists.txt
16 index 25d8004..db23dc9 100644
19 @@ -22,7 +22,7 @@ if(NOT WIN32)
20 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
23 -set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX}/include/kodi")
24 +set(kodiplatform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/kodi")
26 LIST(APPEND kodiplatform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/kodi/windows")
28 diff --git a/kodiplatform-config.cmake.in b/kodiplatform-config.cmake.in
29 index 3fc5273..1bc437a 100644
30 --- a/kodiplatform-config.cmake.in
31 +++ b/kodiplatform-config.cmake.in
34 # propagate these properties from one build system to the other
35 set (kodiplatform_VERSION "@kodiplatform_VERSION_MAJOR@.@kodiplatform_VERSION_MINOR@")
36 -set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)
37 +set (kodiplatform_INCLUDE_DIRS @TINYXML_INCLUDE_DIR@ ${CMAKE_FIND_ROOT_PATH}@kodiplatform_INCLUDE_DIRS@ ${CMAKE_FIND_ROOT_PATH}@CMAKE_INSTALL_PREFIX@/include)
38 set (kodiplatform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
39 set (kodiplatform_LINKER_FLAGS "@kodiplatform_LINKER_FLAGS@")
40 set (kodiplatform_CONFIG_VARS "@kodiplatform_CONFIG_VARS@")
42 # libraries come from the build tree where this file was generated
44 - set (kodiplatform_LIBRARY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/kodiplatform.lib")
45 + set (kodiplatform_LIBRARY "${CMAKE_FIND_ROOT_PATH}@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/kodiplatform.lib")
47 - set (kodiplatform_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lkodiplatform")
48 + set (kodiplatform_LIBRARY "-L${CMAKE_FIND_ROOT_PATH}@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lkodiplatform")
50 set (kodiplatform_LIBRARIES ${kodiplatform_LIBRARY} "@kodiplatform_LIBRARIES@")
51 mark_as_advanced (kodiplatform_LIBRARY)