summaryrefslogtreecommitdiffstats
path: root/project/cmake/addons/bootstrap/Bootstrap.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
committermanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
commitf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch)
treed8de60fc7e17edeb6f0921726c038ee54b281445 /project/cmake/addons/bootstrap/Bootstrap.cmake
parentae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff)
downloadkodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip
sync with upstream
Diffstat (limited to 'project/cmake/addons/bootstrap/Bootstrap.cmake')
-rw-r--r--project/cmake/addons/bootstrap/Bootstrap.cmake39
1 files changed, 0 insertions, 39 deletions
diff --git a/project/cmake/addons/bootstrap/Bootstrap.cmake b/project/cmake/addons/bootstrap/Bootstrap.cmake
deleted file mode 100644
index 5d20302..0000000
--- a/project/cmake/addons/bootstrap/Bootstrap.cmake
+++ /dev/null
@@ -1,39 +0,0 @@
1list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
2
3# make sure that the installation location has been specified
4if(NOT CMAKE_INSTALL_PREFIX)
5 message(FATAL_ERROR "CMAKE_INSTALL_PREFIX has not been specified")
6endif()
7
8# figure out which addons to bootstrap (defaults to all)
9if(NOT ADDONS_TO_BUILD)
10 set(ADDONS_TO_BUILD "all")
11else()
12 string(STRIP "${ADDONS_TO_BUILD}" ADDONS_TO_BUILD)
13 message(STATUS "Bootstrapping following addons: ${ADDONS_TO_BUILD}")
14 string(REPLACE " " ";" ADDONS_TO_BUILD ${ADDONS_TO_BUILD})
15endif()
16
17# find all addon definitions and go through them
18file(GLOB_RECURSE ADDON_DEFINITIONS ${PROJECT_SOURCE_DIR}/*.txt)
19foreach(ADDON_DEFINITION_FILE ${ADDON_DEFINITIONS})
20 # ignore platforms.txt
21 if(NOT (ADDON_DEFINITION_FILE MATCHES platforms.txt))
22 # read the addon definition file
23 file(STRINGS ${ADDON_DEFINITION_FILE} ADDON_DEFINITION)
24 string(REPLACE " " ";" ADDON_DEFINITION ${ADDON_DEFINITION})
25
26 # extract the addon definition's identifier
27 list(GET ADDON_DEFINITION 0 ADDON_ID)
28
29 # check if the addon definition should be built
30 if(ADDON_ID MATCHES "^${ADDONS_TO_BUILD}" OR ADDONS_TO_BUILD STREQUAL all)
31 # get the path to the addon definition directory
32 get_filename_component(ADDON_DEFINITION_DIR ${ADDON_DEFINITION_FILE} DIRECTORY)
33
34 # install the addon definition
35 message(STATUS "Bootstrapping ${ADDON_ID} addon...")
36 file(INSTALL ${ADDON_DEFINITION_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX})
37 endif()
38 endif()
39endforeach()