mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
kodi: Add host target for addon headers
This commit is contained in:
parent
ff6f6996a2
commit
7cf21f41e0
@ -9,6 +9,7 @@ PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.kodi.tv"
|
||||
PKG_URL="https://github.com/xbmc/xbmc/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain JsonSchemaBuilder:host TexturePacker:host Python3 zlib systemd lzo pcre swig:host libass curl fontconfig fribidi tinyxml libjpeg-turbo freetype libcdio taglib libxml2 libxslt rapidjson sqlite ffmpeg crossguid libdvdnav libfmt lirc libfstrcmp flatbuffers:host flatbuffers libudfread spdlog"
|
||||
PKG_DEPENDS_HOST="toolchain"
|
||||
PKG_LONGDESC="A free and open source cross-platform media player."
|
||||
PKG_BUILD_FLAGS="+speed"
|
||||
|
||||
@ -260,6 +261,31 @@ configure_package() {
|
||||
${KODI_PIPEWIRE}"
|
||||
}
|
||||
|
||||
configure_host() {
|
||||
setup_toolchain target:cmake
|
||||
cmake ${CMAKE_GENERATOR_NINJA} \
|
||||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_CONF} \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
|
||||
-DHEADERS_ONLY=ON \
|
||||
${KODI_ARCH} \
|
||||
${KODI_NEON} \
|
||||
${KODI_PLATFORM} ..
|
||||
}
|
||||
|
||||
make_host() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_host() {
|
||||
DESTDIR=${SYSROOT_PREFIX} cmake -DCMAKE_INSTALL_COMPONENT="kodi-addon-dev" -P cmake_install.cmake
|
||||
|
||||
# more binaddons cross compile badness meh
|
||||
sed -e "s:INCLUDE_DIR /usr/include/kodi:INCLUDE_DIR ${SYSROOT_PREFIX}/usr/include/kodi:g" \
|
||||
-e "s:CMAKE_MODULE_PATH /usr/lib/kodi /usr/share/kodi/cmake:CMAKE_MODULE_PATH ${SYSROOT_PREFIX}/usr/share/kodi/cmake:g" \
|
||||
-i ${SYSROOT_PREFIX}/usr/lib/kodi/cmake/KodiConfig.cmake
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
export LIBS="${LIBS} -lncurses"
|
||||
}
|
||||
|
@ -0,0 +1,48 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e5824f0d20b7..cf17e1563a7f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -45,6 +45,7 @@ include(ExternalProject)
|
||||
|
||||
|
||||
# general
|
||||
+option(HEADERS_ONLY "Skip building" OFF)
|
||||
option(VERBOSE "Enable verbose output?" OFF)
|
||||
option(ENABLE_CLANGTIDY "Enable clang-tidy support?" OFF)
|
||||
option(ENABLE_CPPCHECK "Enable cppcheck support?" OFF)
|
||||
@@ -95,6 +96,7 @@ endif()
|
||||
|
||||
core_find_git_rev(APP_SCMID FULL)
|
||||
|
||||
+if(NOT HEADERS_ONLY)
|
||||
# Dynamically loaded libraries built with the project
|
||||
add_custom_target(${APP_NAME_LC}-libraries)
|
||||
set(LIBRARY_FILES "" CACHE STRING "" FORCE)
|
||||
@@ -458,6 +460,7 @@ endif()
|
||||
if(FFMPEG_CREATE_SHARED_LIBRARY)
|
||||
set(CMAKE_CXX_CREATE_SHARED_LIBRARY "${FFMPEG_CREATE_SHARED_LIBRARY}")
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
# Platform specific additional extra targets
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/ExtraTargets.cmake)
|
||||
diff --git a/cmake/scripts/linux/Install.cmake b/cmake/scripts/linux/Install.cmake
|
||||
index 331722cb5616..cc00c55fa27c 100644
|
||||
--- a/cmake/scripts/linux/Install.cmake
|
||||
+++ b/cmake/scripts/linux/Install.cmake
|
||||
@@ -51,6 +51,7 @@ configure_file(${CMAKE_SOURCE_DIR}/tools/Linux/kodi.desktop.in
|
||||
configure_file(${CMAKE_SOURCE_DIR}/tools/Linux/kodi.metainfo.xml.in
|
||||
${CORE_BUILD_DIR}/${APP_PACKAGE}.metainfo.xml @ONLY)
|
||||
|
||||
+if(NOT HEADERS_ONLY)
|
||||
# Install app
|
||||
install(TARGETS ${APP_NAME_LC}
|
||||
DESTINATION ${libdir}/${APP_NAME_LC}
|
||||
@@ -160,6 +161,7 @@ if(INTERNAL_TEXTUREPACKER_INSTALLABLE)
|
||||
RENAME "${APP_NAME_LC}-TexturePacker"
|
||||
COMPONENT kodi-tools-texturepacker)
|
||||
endif()
|
||||
+endif()
|
||||
|
||||
# Install kodi-addon-dev headers
|
||||
include(${CMAKE_SOURCE_DIR}/xbmc/addons/AddonBindings.cmake)
|
Loading…
x
Reference in New Issue
Block a user