Kodi Community Forum
Develop PVR addons with new cmake build system - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: PVR (https://forum.kodi.tv/forumdisplay.php?fid=136)
+---- Thread: Develop PVR addons with new cmake build system (/showthread.php?tid=219166)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13


RE: Develop PVR addons with new cmake build system - ironic_monkey - 2015-03-23

yes, cause you should point it (cmake) to the game.libretro build system, not $HOME/workspace/xbmc/project/cmake/addons


RE: Develop PVR addons with new cmake build system - garbear - 2015-03-23

I followed the OP. how can I point to the game.libretro build system? cmake .. doesn't work:

Code:
CMake Error at CMakeLists.txt:8 (find_package):
  By not providing "Findkodi.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "kodi", but
  CMake did not find one.

  Could not find a package configuration file provided by "kodi" with any of
  the following names:

    kodiConfig.cmake
    kodi-config.cmake

  Add the installation prefix of "kodi" to CMAKE_PREFIX_PATH or set
  "kodi_DIR" to a directory containing one of the above files.  If "kodi"
  provides a separate development package or SDK, be sure it has been
  installed.



RE: Develop PVR addons with new cmake build system - garbear - 2015-03-23

also there's something wrong with -DCMAKE_INSTALL_PREFIX=$HOME/workspace/xbmc/addons

instead of

Code:
$ ls addons/
drwxrwxr-x 67 garrett garrett 4096 Mar 23 01:29 ./
drwxrwxr-x 17 garrett garrett 4096 Mar 22 21:09 ../
drwxrwxr-x  3 garrett garrett 4096 Mar  4 17:39 audioencoder.xbmc.builtin.aac/
drwxrwxr-x  3 garrett garrett 4096 Mar  4 17:39 audioencoder.xbmc.builtin.wma/
...
drwxrwxr-x  3 garrett garrett 4096 Mar 22 19:50 game.libretro/
drwxrwxr-x  3 garrett garrett 4096 Mar 22 19:50 game.libretro.nestopia/

i get

Code:
$ ls addons/
drwxrwxr-x 67 garrett garrett 4096 Mar 23 01:29 ./
drwxrwxr-x 17 garrett garrett 4096 Mar 22 21:09 ../
drwxrwxr-x  3 garrett garrett 4096 Mar  4 17:39 audioencoder.xbmc.builtin.aac/
drwxrwxr-x  3 garrett garrett 4096 Mar  4 17:39 audioencoder.xbmc.builtin.wma/
...
drwxrwxr-x  3 garrett garrett 4096 Mar 22 19:50 lib/
drwxrwxr-x  3 garrett garrett 4096 Mar 22 19:50 share/

Code:
$ find addons/lib/
addons/lib/
addons/lib/kodi
addons/lib/kodi/addons
addons/lib/kodi/addons/game.libretro.nestopia
addons/lib/kodi/addons/game.libretro.nestopia/game.libretro.nestopia.so
addons/lib/kodi/addons/game.libretro
addons/lib/kodi/addons/game.libretro/game.libretro.so.1.0.0
addons/lib/kodi/addons/game.libretro/game.libretro.so
addons/lib/kodi/addons/game.libretro/game.libretro.so.15.0



RE: Develop PVR addons with new cmake build system - ironic_monkey - 2015-03-23

.. nothing wrong, everything is behaving as it should.

to do standalone builds you have to pre-supply the kodi bindings and cmake helpers. make install of kodi does this, so does sudo apt-get install kodi-xxx-dev if you use the ubuntu ppa. you also need to supply kodi-platform for most addons.

you get those lib and share directories cause you do not set PACKAGE_ZIP. that changes the install format from a normal linux install (which you are seeing) to a scheme suitable for zip files. you can do 'make addon-package' and you'll get the addon zipped and ready for install in addon browser (for sticking in a repo).


RE: Develop PVR addons with new cmake build system - garbear - 2015-03-23

I'm trying to supply the kodi bindings to cmake

-DCMAKE_PREFIX_PATH=$HOME/kodi gives me the missing kodi-config.cmake error

-DCMAKE_PREFIX_PATH=$HOME/kodi/usr/local locates kodi-config.cmake but can't find kodiplatform-config.cmake

is there a second variable i need to provide kodi-platform or should I be pointing CMAKE_PREFIX_PATH somewhere other than the usr/lib folder of kodi's make install destination?


RE: Develop PVR addons with new cmake build system - ironic_monkey - 2015-03-23

in standalone builds, everything behaves as "normal" software builds. the build system looks for its dependencies, by default with /usr and /usr/local prefixes.

in those prefixes you have to supply a 'make install' of kodi, and a 'make install' of kodi-platform, or provide the files through other means (e.g. apt-get).

if you do not want to stick them on your system/in those prefixes, you build and install kodi and kodi-platform with another prefix. e.g. $HOME/kodi and then supply that to the addon build system as a prefix.

it seems you haven't set the prefix for kodi, but rather the DESTDIR. you can use that if you want, but then you have to adjust the prefix path accordingly (in your case the prefix is $HOME/kodi/usr/local).


RE: Develop PVR addons with new cmake build system - garbear - 2015-03-23

k, think I got it. can you check https://github.com/kodi-game/game.libretro/blob/master/Readme.md section "Building stand-alone" real quick?


RE: Develop PVR addons with new cmake build system - scarecrow420 - 2015-03-23

Out of interest, what are the benefits of the new build system? Will Kodi itself be moving to this cmake based build system as well?

Also on the windows platform, the previous projects included the post build event to copy the deliverables into the kodi addons folder (when project was part of kodi solution). The first post mentions to create the post build event ourselves, which is easy enough, but what about making the cmake generated visual studio projects include the post build events automatically, is that possible to do?


RE: Develop PVR addons with new cmake build system - ironic_monkey - 2015-03-23

1) a single build system for all platforms
2) decoupled repositories
3) once everything is done, binary addons will be just like other addons
- hosted in a repo
- updateable completely on their own

yes, you can do that as a post-build step in the project. i do that in my fork
https://github.com/notspiff/kodi-cmake/blob/master/project/cmake/templates/kodi-addon-helpers.cmake.in#L98


RE: Develop PVR addons with new cmake build system - Montellese - 2015-03-23

The build system is written for packaging/deployment and not for development. But on win32 you can simple change the path of CMAKE_INSTALL_PREFIX to the addons directory of your Kodi installation/development checkout and the addon directories will automatically be generated there.


RE: Develop PVR addons with new cmake build system - scarecrow420 - 2015-03-23

(2015-03-23, 14:12)ironic_monkey Wrote: 1) a single build system for all platforms
2) decoupled repositories
3) once everything is done, binary addons will be just like other addons
- hosted in a repo
- updateable completely on their own

yes, you can do that as a post-build step in the project. i do that in my fork
https://github.com/notspiff/kodi-cmake/blob/master/project/cmake/templates/kodi-addon-helpers.cmake.in#L98

cool. any reason why thats just in your fork and not PR'ed into the main repo?


RE: Develop PVR addons with new cmake build system - ironic_monkey - 2015-03-23

because my system is quite a bit different than upstream; all addons are built inline with the main build system since my fork is all cmake. they need to build equivalent functionality in their system.


RE: Develop PVR addons with new cmake build system - Leatherface - 2015-04-02

I have tried many things and can't get this to work

leatherface@A3850:~/Compile/xbmc> cmake -DADDONS_TO_BUILD=pvr.hts -DADDON_SRC_PREFIX=/home/leatherface/Compile/xbmc/pvr-addons -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/lib64/kodi/addons -DPACKAGE_ZIP=1 pvr-addons/addons/pvr.hts
package zip specified
-- Building following addons: pvr.hts
-- Overriding addon source directory prefix: /home/leatherface/Compile/xbmc/pvr-addons
Error making directory "/usr/lib64/kodi/addons/lib/kodi".
Error making directory "/usr/lib64/kodi/addons/share/kodi".
-- check_install_permissions: 1
-- NEED_SUDO: TRUE
-- Processing /home/leatherface/Compile/xbmc/project/cmake/addons/depends/common/tinyxml/tinyxml.txt
-- tinyxml url: http://mirrors.xbmc.org/build-deps/sources/tinyxml-2.6.2_2.tar.gz
-- Processing /home/leatherface/Compile/xbmc/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
-- kodi-platform url: https://github.com/xbmc/kodi-platform
-- kodi-platform depends: kodi;tinyxml
-- No platform specific file /home/leatherface/Compile/xbmc/project/cmake/addons/depends/linux/CMakeLists.txt found
CMake Error at CMakeLists.txt:279 (message):
pvr.hts: invalid or missing addon source directory at
/home/leatherface/Compile/xbmc/pvr-addons/pvr.hts


-- Configuring incomplete, errors occurred!
See also "/home/leatherface/Compile/xbmc/pvr-addons/addons/pvr.hts/CMakeFiles/CMakeOutput.log".


RE: Develop PVR addons with new cmake build system - ironic_monkey - 2015-04-02

Did you clone them addons in /home/leatherface/Compile/xbmc/pvr-addons? Doesnt look like it.


RE: Develop PVR addons with new cmake build system - Leatherface - 2015-04-02

I cloned the new addons from kodi-pvr repository and have tried outside xbmc dir with same results.