diff options
Diffstat (limited to 'project/cmake/addons/depends')
| -rw-r--r-- | project/cmake/addons/depends/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | project/cmake/addons/depends/README | 6 | ||||
| -rw-r--r-- | project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt | 2 | ||||
| -rw-r--r-- | project/cmake/addons/depends/common/tinyxml/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | project/cmake/addons/depends/windows/CMakeLists.txt | 23 | ||||
| -rw-r--r-- | project/cmake/addons/depends/windows/Find7Zip.cmake | 7 | ||||
| -rw-r--r-- | project/cmake/addons/depends/windows/Install.cmake (renamed from project/cmake/addons/depends/windows/install.cmake) | 0 | ||||
| -rw-r--r-- | project/cmake/addons/depends/windows/extract-7z.cmake | 10 | ||||
| -rw-r--r-- | project/cmake/addons/depends/windows/extract-direct.cmake | 2 |
9 files changed, 22 insertions, 46 deletions
diff --git a/project/cmake/addons/depends/CMakeLists.txt b/project/cmake/addons/depends/CMakeLists.txt index 760acf4..622701d 100644 --- a/project/cmake/addons/depends/CMakeLists.txt +++ b/project/cmake/addons/depends/CMakeLists.txt | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.1) | ||
| 1 | project(kodi-addons-depends) | 2 | project(kodi-addons-depends) |
| 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 | if(NOT CMAKE_BUILD_TYPE) | 6 | if(NOT CMAKE_BUILD_TYPE) |
| @@ -14,13 +13,13 @@ endif() | |||
| 14 | 13 | ||
| 15 | include(ExternalProject) | 14 | include(ExternalProject) |
| 16 | 15 | ||
| 17 | if(NOT DEPENDS_PATH) | 16 | if(NOT ADDON_DEPENDS_PATH) |
| 18 | set(DEPENDS_PATH ${PROJECT_SOURCE_DIR}/../build/depends) | 17 | set(ADDON_DEPENDS_PATH ${PROJECT_SOURCE_DIR}/../build/depends) |
| 19 | else() | 18 | else() |
| 20 | file(TO_CMAKE_PATH "${DEPENDS_PATH}" DEPENDS_PATH) | 19 | file(TO_CMAKE_PATH "${ADDON_DEPENDS_PATH}" ADDON_DEPENDS_PATH) |
| 21 | endif() | 20 | endif() |
| 22 | get_filename_component(DEPENDS_PATH "${DEPENDS_PATH}" ABSOLUTE) | 21 | get_filename_component(ADDON_DEPENDS_PATH "${ADDON_DEPENDS_PATH}" ABSOLUTE) |
| 23 | list(APPEND CMAKE_PREFIX_PATH ${DEPENDS_PATH}) | 22 | list(APPEND CMAKE_PREFIX_PATH ${ADDON_DEPENDS_PATH}) |
| 24 | 23 | ||
| 25 | if(NOT BUILD_DIR) | 24 | if(NOT BUILD_DIR) |
| 26 | set(BUILD_DIR "${CMAKE_BINARY_DIR}/build") | 25 | set(BUILD_DIR "${CMAKE_BINARY_DIR}/build") |
| @@ -30,7 +29,7 @@ endif() | |||
| 30 | get_filename_component(BUILD_DIR "${BUILD_DIR}" ABSOLUTE) | 29 | get_filename_component(BUILD_DIR "${BUILD_DIR}" ABSOLUTE) |
| 31 | 30 | ||
| 32 | ## use add_addon_depends to handle the cmake based dependencies | 31 | ## use add_addon_depends to handle the cmake based dependencies |
| 33 | include(${APP_ROOT}/project/cmake/scripts/common/handle-depends.cmake) | 32 | include(${CORE_SOURCE_DIR}/project/cmake/scripts/common/HandleDepends.cmake) |
| 34 | add_addon_depends(depends "${PROJECT_SOURCE_DIR}") | 33 | add_addon_depends(depends "${PROJECT_SOURCE_DIR}") |
| 35 | 34 | ||
| 36 | ## if there's a platform-specific sub-directory containing a CMakeLists.txt, add it to the build as well | 35 | ## if there's a platform-specific sub-directory containing a CMakeLists.txt, add it to the build as well |
diff --git a/project/cmake/addons/depends/README b/project/cmake/addons/depends/README index 66e924a..584a167 100644 --- a/project/cmake/addons/depends/README +++ b/project/cmake/addons/depends/README | |||
| @@ -34,9 +34,9 @@ specific paths: | |||
| 34 | builds. | 34 | builds. |
| 35 | * CORE_SYSTEM_NAME is the name of the platform (e.g. "linux" or "android") in | 35 | * CORE_SYSTEM_NAME is the name of the platform (e.g. "linux" or "android") in |
| 36 | lower-case (defaults to lowercase(CMAKE_SYSTEM_NAME)). | 36 | lower-case (defaults to lowercase(CMAKE_SYSTEM_NAME)). |
| 37 | * APP_ROOT points to the root directory of the project (default is the | 37 | * CORE_SOURCE_DIR points to the root directory of the project (default is the |
| 38 | absolute representation of ../../.. starting from this directory). | 38 | absolute representation of ../../.. starting from this directory). |
| 39 | * DEPENDS_PATH points to the directory where the built dependencies | 39 | * ADDON_DEPENDS_PATH points to the directory where the built dependencies |
| 40 | (their include and library file) will be installed to. | 40 | (their include and library file) will be installed to. |
| 41 | * ARCH_DEFINES specifies the platform-specific C/C++ preprocessor defines | 41 | * ARCH_DEFINES specifies the platform-specific C/C++ preprocessor defines |
| 42 | (defaults to empty). | 42 | (defaults to empty). |
| @@ -56,6 +56,6 @@ In case of additional options the call might look like this | |||
| 56 | 56 | ||
| 57 | cmake <path> [-G <generator>] \ | 57 | cmake <path> [-G <generator>] \ |
| 58 | -DCMAKE_BUILD_TYPE=Release \ | 58 | -DCMAKE_BUILD_TYPE=Release \ |
| 59 | -DAPP_ROOT="<path-to-project-root>" \ | 59 | -DCORE_SOURCE_DIR="<path-to-project-root>" \ |
| 60 | -DARCH_DEFINES="-DTARGET_LINUX" \ | 60 | -DARCH_DEFINES="-DTARGET_LINUX" \ |
| 61 | -DCMAKE_INSTALL_PREFIX="<path-to-install-directory" | 61 | -DCMAKE_INSTALL_PREFIX="<path-to-install-directory" |
diff --git a/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt b/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt index de42267..46ef93c 100644 --- a/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt +++ b/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt | |||
| @@ -1 +1 @@ | |||
| kodi-platform https://github.com/xbmc/kodi-platform fed924e764b4c9c722f7f5d825ce70d4b61ae54f | kodi-platform https://github.com/xbmc/kodi-platform c8188d82678fec6b784597db69a68e74ff4986b5 | ||
diff --git a/project/cmake/addons/depends/common/tinyxml/CMakeLists.txt b/project/cmake/addons/depends/common/tinyxml/CMakeLists.txt index 5468bfb..ec396ee 100644 --- a/project/cmake/addons/depends/common/tinyxml/CMakeLists.txt +++ b/project/cmake/addons/depends/common/tinyxml/CMakeLists.txt | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.1) | ||
| 1 | project(tinyxml) | 2 | project(tinyxml) |
| 2 | 3 | ||
| 3 | cmake_minimum_required(VERSION 2.8) | ||
| 4 | |||
| 5 | set(SOURCES src/tinystr.cpp | 4 | set(SOURCES src/tinystr.cpp |
| 6 | src/tinyxml.cpp | 5 | src/tinyxml.cpp |
| 7 | src/tinyxmlerror.cpp | 6 | src/tinyxmlerror.cpp |
diff --git a/project/cmake/addons/depends/windows/CMakeLists.txt b/project/cmake/addons/depends/windows/CMakeLists.txt index 4480f1e..c8739c0 100644 --- a/project/cmake/addons/depends/windows/CMakeLists.txt +++ b/project/cmake/addons/depends/windows/CMakeLists.txt | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | cmake_minimum_required(VERSION 3.1) | ||
| 1 | project(kodi-addons-depends-windows) | 2 | project(kodi-addons-depends-windows) |
| 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 | if(NOT CMAKE_BUILD_TYPE) | 6 | if(NOT CMAKE_BUILD_TYPE) |
| @@ -10,13 +9,13 @@ endif() | |||
| 10 | 9 | ||
| 11 | include(ExternalProject) | 10 | include(ExternalProject) |
| 12 | 11 | ||
| 13 | if(NOT DEPENDS_PATH) | 12 | if(NOT ADDON_DEPENDS_PATH) |
| 14 | message(FATAL_ERROR "DEPENDS_PATH (${DEPENDS_PATH}) is not a valid target directory.") | 13 | message(FATAL_ERROR "ADDON_DEPENDS_PATH (${ADDON_DEPENDS_PATH}) is not a valid target directory.") |
| 15 | else() | 14 | else() |
| 16 | file(TO_CMAKE_PATH "${DEPENDS_PATH}" DEPENDS_PATH) | 15 | file(TO_CMAKE_PATH "${ADDON_DEPENDS_PATH}" ADDON_DEPENDS_PATH) |
| 17 | endif() | 16 | endif() |
| 18 | get_filename_component(DEPENDS_PATH "${DEPENDS_PATH}" ABSOLUTE) | 17 | get_filename_component(ADDON_DEPENDS_PATH "${ADDON_DEPENDS_PATH}" ABSOLUTE) |
| 19 | list(APPEND CMAKE_PREFIX_PATH ${DEPENDS_PATH}) | 18 | list(APPEND CMAKE_PREFIX_PATH ${ADDON_DEPENDS_PATH}) |
| 20 | 19 | ||
| 21 | if(NOT DEPENDS_TO_BUILD) | 20 | if(NOT DEPENDS_TO_BUILD) |
| 22 | set(DEPENDS_TO_BUILD "all") | 21 | set(DEPENDS_TO_BUILD "all") |
| @@ -31,19 +30,17 @@ function(add_internal id url inputfile) | |||
| 31 | INSTALL_COMMAND ${CMAKE_COMMAND} | 30 | INSTALL_COMMAND ${CMAKE_COMMAND} |
| 32 | -DINPUTDIR=${PROJECT_BINARY_DIR}/build/${id}/src/${id} | 31 | -DINPUTDIR=${PROJECT_BINARY_DIR}/build/${id}/src/${id} |
| 33 | -DINPUTFILE=${inputfile} | 32 | -DINPUTFILE=${inputfile} |
| 34 | -DDESTDIR=${DEPENDS_PATH} | 33 | -DDESTDIR=${ADDON_DEPENDS_PATH} |
| 35 | -P ${PROJECT_SOURCE_DIR}/install.cmake | 34 | -P ${PROJECT_SOURCE_DIR}/Install.cmake |
| 36 | ) | 35 | ) |
| 37 | endfunction() | 36 | endfunction() |
| 38 | 37 | ||
| 39 | #find_package(7Zip REQUIRED) | ||
| 40 | |||
| 41 | file(GLOB_RECURSE download_input_files prebuilt/*.txt) | 38 | file(GLOB_RECURSE download_input_files prebuilt/*.txt) |
| 42 | foreach(file ${download_input_files}) | 39 | foreach(file ${download_input_files}) |
| 43 | if(NOT file MATCHES install.txt) | 40 | if(NOT file MATCHES install.txt) |
| 44 | file(STRINGS ${file} def) | 41 | file(STRINGS ${file} def) |
| 45 | get_filename_component(dir ${file} PATH) | 42 | get_filename_component(dir ${file} DIRECTORY) |
| 46 | separate_arguments(def) | 43 | string(REPLACE " " ";" def ${def}) |
| 47 | list(GET def 0 id) | 44 | list(GET def 0 id) |
| 48 | 45 | ||
| 49 | list(FIND DEPENDS_TO_BUILD ${id} idx) | 46 | list(FIND DEPENDS_TO_BUILD ${id} idx) |
diff --git a/project/cmake/addons/depends/windows/Find7Zip.cmake b/project/cmake/addons/depends/windows/Find7Zip.cmake deleted file mode 100644 index 82b0902..0000000 --- a/project/cmake/addons/depends/windows/Find7Zip.cmake +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | find_program(7ZIP_EXECUTABLE NAMES 7z.exe | ||
| 2 | HINTS PATHS "c:/Program Files/7-Zip") | ||
| 3 | |||
| 4 | include(FindPackageHandleStandardArgs) | ||
| 5 | find_package_handle_standard_args(7Zip DEFAULT_MSG 7ZIP_EXECUTABLE) | ||
| 6 | |||
| 7 | mark_as_advanced(7ZIP_EXECUTABLE) | ||
diff --git a/project/cmake/addons/depends/windows/install.cmake b/project/cmake/addons/depends/windows/Install.cmake index 9a3adbb..9a3adbb 100644 --- a/project/cmake/addons/depends/windows/install.cmake +++ b/project/cmake/addons/depends/windows/Install.cmake | |||
diff --git a/project/cmake/addons/depends/windows/extract-7z.cmake b/project/cmake/addons/depends/windows/extract-7z.cmake deleted file mode 100644 index 95a2672..0000000 --- a/project/cmake/addons/depends/windows/extract-7z.cmake +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | get_filename_component(file ${URL} NAME) | ||
| 2 | file(DOWNLOAD ${URL} ${DEST}/${file}) | ||
| 3 | execute_process(COMMAND ${7ZIP_EXECUTABLE} -y x ${DEST}/${file} | ||
| 4 | WORKING_DIRECTORY ${DESTDIR}) | ||
| 5 | if(${file} MATCHES .tar) | ||
| 6 | string(REPLACE ".7z" "" tarball ${file}) | ||
| 7 | string(REPLACE ".lzma" "" tarball ${file}) | ||
| 8 | execute_process(COMMAND ${7ZIP_EXECUTABLE} -y x ${DESTDIR}/${tarball} | ||
| 9 | WORKING_DIRECTORY ${DESTDIR}) | ||
| 10 | endif() | ||
diff --git a/project/cmake/addons/depends/windows/extract-direct.cmake b/project/cmake/addons/depends/windows/extract-direct.cmake deleted file mode 100644 index 13cb74f..0000000 --- a/project/cmake/addons/depends/windows/extract-direct.cmake +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | get_filename_component(file ${URL} NAME) | ||
| 2 | file(DOWNLOAD ${URL} ${DEST}/${file}) | ||
