summaryrefslogtreecommitdiffstats
path: root/project/cmake/addons/bootstrap/bootstrap.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2016-11-24 21:27:41 +0100
committermanuel <manuel@mausz.at>2016-11-24 21:27:41 +0100
commit8cdf8dec703d882b46ca50a769fabb95ffc48e2c (patch)
treef7fe8233508f79d3dc94f8f445ce6342e7dfbdbb /project/cmake/addons/bootstrap/bootstrap.cmake
parent5823b05feb29a59510c32a9c28ca18b50b9b6399 (diff)
downloadkodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.tar.gz
kodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.tar.bz2
kodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.zip
sync with upstream
Diffstat (limited to 'project/cmake/addons/bootstrap/bootstrap.cmake')
-rw-r--r--project/cmake/addons/bootstrap/bootstrap.cmake40
1 files changed, 0 insertions, 40 deletions
diff --git a/project/cmake/addons/bootstrap/bootstrap.cmake b/project/cmake/addons/bootstrap/bootstrap.cmake
deleted file mode 100644
index 25e8aa2..0000000
--- a/project/cmake/addons/bootstrap/bootstrap.cmake
+++ /dev/null
@@ -1,40 +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 separate_arguments(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 separate_arguments(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 list(FIND ADDONS_TO_BUILD ${ADDON_ID} ADDONS_TO_BUILD_IDX)
31 if(ADDONS_TO_BUILD_IDX GREATER -1 OR "${ADDONS_TO_BUILD}" STREQUAL "all")
32 # get the path to the addon definition directory
33 get_filename_component(ADDON_DEFINITION_DIR ${ADDON_DEFINITION_FILE} PATH)
34
35 # install the addon definition
36 message(STATUS "Bootstrapping ${ADDON_ID} addon...")
37 file(INSTALL ${ADDON_DEFINITION_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX})
38 endif()
39 endif()
40endforeach()