diff options
| author | manuel <manuel@mausz.at> | 2016-11-24 21:27:41 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2016-11-24 21:27:41 +0100 |
| commit | 8cdf8dec703d882b46ca50a769fabb95ffc48e2c (patch) | |
| tree | f7fe8233508f79d3dc94f8f445ce6342e7dfbdbb /project/cmake/addons/bootstrap | |
| parent | 5823b05feb29a59510c32a9c28ca18b50b9b6399 (diff) | |
| download | kodi-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')
| -rw-r--r-- | project/cmake/addons/bootstrap/Bootstrap.cmake (renamed from project/cmake/addons/bootstrap/bootstrap.cmake) | 9 | ||||
| -rw-r--r-- | project/cmake/addons/bootstrap/CMakeLists.txt | 7 |
2 files changed, 7 insertions, 9 deletions
diff --git a/project/cmake/addons/bootstrap/bootstrap.cmake b/project/cmake/addons/bootstrap/Bootstrap.cmake index 25e8aa2..5d20302 100644 --- a/project/cmake/addons/bootstrap/bootstrap.cmake +++ b/project/cmake/addons/bootstrap/Bootstrap.cmake | |||
| @@ -11,7 +11,7 @@ if(NOT ADDONS_TO_BUILD) | |||
| 11 | else() | 11 | else() |
| 12 | string(STRIP "${ADDONS_TO_BUILD}" ADDONS_TO_BUILD) | 12 | string(STRIP "${ADDONS_TO_BUILD}" ADDONS_TO_BUILD) |
| 13 | message(STATUS "Bootstrapping following addons: ${ADDONS_TO_BUILD}") | 13 | message(STATUS "Bootstrapping following addons: ${ADDONS_TO_BUILD}") |
| 14 | separate_arguments(ADDONS_TO_BUILD) | 14 | string(REPLACE " " ";" ADDONS_TO_BUILD ${ADDONS_TO_BUILD}) |
| 15 | endif() | 15 | endif() |
| 16 | 16 | ||
| 17 | # find all addon definitions and go through them | 17 | # find all addon definitions and go through them |
| @@ -21,16 +21,15 @@ foreach(ADDON_DEFINITION_FILE ${ADDON_DEFINITIONS}) | |||
| 21 | if(NOT (ADDON_DEFINITION_FILE MATCHES platforms.txt)) | 21 | if(NOT (ADDON_DEFINITION_FILE MATCHES platforms.txt)) |
| 22 | # read the addon definition file | 22 | # read the addon definition file |
| 23 | file(STRINGS ${ADDON_DEFINITION_FILE} ADDON_DEFINITION) | 23 | file(STRINGS ${ADDON_DEFINITION_FILE} ADDON_DEFINITION) |
| 24 | separate_arguments(ADDON_DEFINITION) | 24 | string(REPLACE " " ";" ADDON_DEFINITION ${ADDON_DEFINITION}) |
| 25 | 25 | ||
| 26 | # extract the addon definition's identifier | 26 | # extract the addon definition's identifier |
| 27 | list(GET ADDON_DEFINITION 0 ADDON_ID) | 27 | list(GET ADDON_DEFINITION 0 ADDON_ID) |
| 28 | 28 | ||
| 29 | # check if the addon definition should be built | 29 | # check if the addon definition should be built |
| 30 | list(FIND ADDONS_TO_BUILD ${ADDON_ID} ADDONS_TO_BUILD_IDX) | 30 | if(ADDON_ID MATCHES "^${ADDONS_TO_BUILD}" OR ADDONS_TO_BUILD STREQUAL all) |
| 31 | if(ADDONS_TO_BUILD_IDX GREATER -1 OR "${ADDONS_TO_BUILD}" STREQUAL "all") | ||
| 32 | # get the path to the addon definition directory | 31 | # get the path to the addon definition directory |
| 33 | get_filename_component(ADDON_DEFINITION_DIR ${ADDON_DEFINITION_FILE} PATH) | 32 | get_filename_component(ADDON_DEFINITION_DIR ${ADDON_DEFINITION_FILE} DIRECTORY) |
| 34 | 33 | ||
| 35 | # install the addon definition | 34 | # install the addon definition |
| 36 | message(STATUS "Bootstrapping ${ADDON_ID} addon...") | 35 | message(STATUS "Bootstrapping ${ADDON_ID} addon...") |
diff --git a/project/cmake/addons/bootstrap/CMakeLists.txt b/project/cmake/addons/bootstrap/CMakeLists.txt index 86950b8..c20b97e 100644 --- a/project/cmake/addons/bootstrap/CMakeLists.txt +++ b/project/cmake/addons/bootstrap/CMakeLists.txt | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.1) | ||
| 1 | project(kodi-addons-bootstrap) | 2 | project(kodi-addons-bootstrap) |
| 2 | 3 | ||
| 3 | cmake_minimum_required(VERSION 2.8) | ||
| 4 | |||
| 5 | list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) | 4 | list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}) |
| 6 | 5 | ||
| 7 | # make sure CMAKE_INSTALL_PREFIX is properly set | 6 | # make sure CMAKE_INSTALL_PREFIX is properly set |
| @@ -52,7 +51,7 @@ function(bootstrap_repo repo_id repo_url repo_revision) | |||
| 52 | -DPROJECT_SOURCE_DIR=<SOURCE_DIR> | 51 | -DPROJECT_SOURCE_DIR=<SOURCE_DIR> |
| 53 | -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} | 52 | -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} |
| 54 | -DADDONS_TO_BUILD=${ADDONS_TO_BUILD} | 53 | -DADDONS_TO_BUILD=${ADDONS_TO_BUILD} |
| 55 | -P ${PROJECT_SOURCE_DIR}/bootstrap.cmake | 54 | -P ${PROJECT_SOURCE_DIR}/Bootstrap.cmake |
| 56 | ) | 55 | ) |
| 57 | endfunction() | 56 | endfunction() |
| 58 | 57 | ||
| @@ -61,7 +60,7 @@ set(REPOSITORY_TO_BUILD_FOUND OFF) | |||
| 61 | file(GLOB repos repositories/*.txt) | 60 | file(GLOB repos repositories/*.txt) |
| 62 | foreach(repo ${repos}) | 61 | foreach(repo ${repos}) |
| 63 | file(STRINGS ${repo} repo_definition) | 62 | file(STRINGS ${repo} repo_definition) |
| 64 | separate_arguments(repo_definition) | 63 | string(REPLACE " " ";" repo_definition ${repo_definition}) |
| 65 | list(GET repo_definition 0 repo_id) | 64 | list(GET repo_definition 0 repo_id) |
| 66 | 65 | ||
| 67 | list(FIND REPOSITORY_TO_BUILD ${repo_id} idx) | 66 | list(FIND REPOSITORY_TO_BUILD ${repo_id} idx) |
