p8-platform: fix generated p8-platform-config.cmake

This commit is contained in:
Jonas Karlman 2017-01-03 21:20:57 +01:00
parent 1048bfd7ac
commit b7802b8840
2 changed files with 34 additions and 3 deletions

View File

@ -32,10 +32,9 @@ PKG_LONGDESC="Platform support library used by libCEC and binary add-ons for Kod
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
PKG_CMAKE_OPTS_TARGET="-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_INSTALL_LIBDIR_NOARCH=/usr/lib \
PKG_CMAKE_OPTS_TARGET="-DCMAKE_INSTALL_LIBDIR:STRING=lib \
-DCMAKE_INSTALL_LIBDIR_NOARCH:STRING=lib \
-DCMAKE_INSTALL_PREFIX_TOOLCHAIN=$SYSROOT_PREFIX/usr \
-DCMAKE_PREFIX_PATH=$SYSROOT_PREFIX/usr \
-DBUILD_SHARED_LIBS=0"
post_makeinstall_target() {

View File

@ -0,0 +1,32 @@
diff -Naur a/p8-platform-config.cmake.in b/p8-platform-config.cmake.in
--- a/p8-platform-config.cmake.in 2016-01-19 20:51:52.000000000 +0100
+++ b/p8-platform-config.cmake.in 2017-01-03 19:48:27.000000000 +0100
@@ -10,16 +10,16 @@
#
# propagate these properties from one build system to the other
set (p8-platform_VERSION "@p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@")
-set (p8-platform_INCLUDE_DIRS @p8-platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include)
+set (p8-platform_INCLUDE_DIRS @p8-platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX_TOOLCHAIN@/include/p8-platform)
set (p8-platform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@")
set (p8-platform_LINKER_FLAGS "@p8-platform_LINKER_FLAGS@")
set (p8-platform_CONFIG_VARS "@p8-platform_CONFIG_VARS@")
# libraries come from the build tree where this file was generated
if(WIN32)
- set (p8-platform_LIBRARY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/p8-platform.lib")
+ set (p8-platform_LIBRARY "@CMAKE_INSTALL_PREFIX_TOOLCHAIN@/@CMAKE_INSTALL_LIBDIR@/p8-platform.lib")
else(WIN32)
- set (p8-platform_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lp8-platform")
+ set (p8-platform_LIBRARY "-L@CMAKE_INSTALL_PREFIX_TOOLCHAIN@/@CMAKE_INSTALL_LIBDIR@ -lp8-platform")
endif(WIN32)
set (p8-platform_LIBRARIES ${p8-platform_LIBRARY} "@p8-platform_LIBRARIES@")
mark_as_advanced (p8-platform_LIBRARY)
diff -Naur a/p8-platform.pc.in b/p8-platform.pc.in
--- a/p8-platform.pc.in 2016-01-19 20:51:52.000000000 +0100
+++ b/p8-platform.pc.in 2017-01-03 19:48:13.000000000 +0100
@@ -7,4 +7,4 @@
Description: @p8-platform_DESCRIPTION@ @p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@
Version: @p8-platform_VERSION_MAJOR@.@p8-platform_VERSION_MINOR@.@p8-platform_VERSION_PATCH@
Libs: -L${libdir} -lp8-platform
-Cflags: -I${includedir}
+Cflags: -I${includedir}/p8-platform