aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2022-01-17 11:56:55 +1000
committerfuzzard <fuzzard@kodi.tv>2022-01-17 12:31:28 +1000
commitd7e7ee41d252b412d7fe6c6085bba83abb208aeb (patch)
treee1443e3f36a895ab65ed4a9d2cbaa51f21d492ea /cmake
parent387df8469f712712bb0865d8095380874c3c985e (diff)
[cmake] set TARBALLS_DIR for overriding tarball download location
TARBALL_DIR is set in common Archsetup after the load of platform archsetup. This allows platforms to potentially set a default if not provided, otherwise fallback to a default
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindCrossGUID.cmake2
-rw-r--r--cmake/modules/FindDav1d.cmake2
-rw-r--r--cmake/modules/FindFFMPEG.cmake2
-rw-r--r--cmake/modules/FindFlatBuffers.cmake2
-rw-r--r--cmake/modules/FindFmt.cmake2
-rw-r--r--cmake/modules/FindFstrcmp.cmake2
-rw-r--r--cmake/modules/FindGtest.cmake2
-rw-r--r--cmake/modules/FindLibDvd.cmake12
-rw-r--r--cmake/modules/FindRapidJSON.cmake2
-rw-r--r--cmake/modules/FindSpdlog.cmake2
-rw-r--r--cmake/modules/FindUdfread.cmake2
-rw-r--r--cmake/scripts/common/ArchSetup.cmake5
-rw-r--r--cmake/scripts/darwin_embedded/ArchSetup.cmake4
-rw-r--r--cmake/scripts/osx/ArchSetup.cmake4
-rw-r--r--cmake/scripts/windows/ArchSetup.cmake4
-rw-r--r--cmake/scripts/windowsstore/ArchSetup.cmake3
16 files changed, 36 insertions, 16 deletions
diff --git a/cmake/modules/FindCrossGUID.cmake b/cmake/modules/FindCrossGUID.cmake
index e1fa61a5b3..01ec1a05f9 100644
--- a/cmake/modules/FindCrossGUID.cmake
+++ b/cmake/modules/FindCrossGUID.cmake
@@ -23,7 +23,7 @@ if(ENABLE_INTERNAL_CROSSGUID)
set(CROSSGUID_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include)
externalproject_add(crossguid
URL ${CROSSGUID_URL}
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/crossguid
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
diff --git a/cmake/modules/FindDav1d.cmake b/cmake/modules/FindDav1d.cmake
index 78e2bd1447..a5a21b12e5 100644
--- a/cmake/modules/FindDav1d.cmake
+++ b/cmake/modules/FindDav1d.cmake
@@ -47,7 +47,7 @@ if(ENABLE_INTERNAL_DAV1D)
externalproject_add(dav1d
URL ${DAV1D_URL}
DOWNLOAD_NAME ${ARCHIVE}
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/dav1d
CONFIGURE_COMMAND meson
--buildtype=release
diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake
index 4e33844d3a..be77c51024 100644
--- a/cmake/modules/FindFFMPEG.cmake
+++ b/cmake/modules/FindFFMPEG.cmake
@@ -251,7 +251,7 @@ if(NOT FFMPEG_FOUND)
externalproject_add(ffmpeg
URL ${FFMPEG_URL}
DOWNLOAD_NAME ${ARCHIVE}
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/ffmpeg
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
diff --git a/cmake/modules/FindFlatBuffers.cmake b/cmake/modules/FindFlatBuffers.cmake
index 8f3de7f864..4d7a9ba331 100644
--- a/cmake/modules/FindFlatBuffers.cmake
+++ b/cmake/modules/FindFlatBuffers.cmake
@@ -31,7 +31,7 @@ if(ENABLE_INTERNAL_FLATBUFFERS)
externalproject_add(flatbuffers
URL ${FLATBUFFERS_URL}
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/flatbuffers
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
-DCMAKE_BUILD_TYPE=Release
diff --git a/cmake/modules/FindFmt.cmake b/cmake/modules/FindFmt.cmake
index e50bd8b379..d3d66820f8 100644
--- a/cmake/modules/FindFmt.cmake
+++ b/cmake/modules/FindFmt.cmake
@@ -37,7 +37,7 @@ if(ENABLE_INTERNAL_FMT)
set(FMT_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include)
externalproject_add(fmt
URL ${FMT_URL}
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/fmt
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}
diff --git a/cmake/modules/FindFstrcmp.cmake b/cmake/modules/FindFstrcmp.cmake
index 9e68c67475..038331bf5c 100644
--- a/cmake/modules/FindFstrcmp.cmake
+++ b/cmake/modules/FindFstrcmp.cmake
@@ -32,7 +32,7 @@ if(ENABLE_INTERNAL_FSTRCMP)
set(FSTRCMP_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include)
externalproject_add(fstrcmp
URL ${FSTRCMP_URL}
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/fstrcmp
PATCH_COMMAND autoreconf -vif
CONFIGURE_COMMAND ./configure --prefix ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
diff --git a/cmake/modules/FindGtest.cmake b/cmake/modules/FindGtest.cmake
index 8dc350dc1f..f2b7e9fe8a 100644
--- a/cmake/modules/FindGtest.cmake
+++ b/cmake/modules/FindGtest.cmake
@@ -38,7 +38,7 @@ if(ENABLE_INTERNAL_GTEST)
externalproject_add(gtest
URL ${GTEST_URL}
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/gtest
INSTALL_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} -DBUILD_GMOCK=OFF -DINSTALL_GTEST=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_INSTALL_LIBDIR=lib
diff --git a/cmake/modules/FindLibDvd.cmake b/cmake/modules/FindLibDvd.cmake
index 58a7aab309..27dfaa2980 100644
--- a/cmake/modules/FindLibDvd.cmake
+++ b/cmake/modules/FindLibDvd.cmake
@@ -111,7 +111,7 @@ else()
set(DVDCSS_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdcss.a)
ExternalProject_Add(dvdcss URL ${LIBDVDCSS_URL}
DOWNLOAD_NAME libdvdcss-${libdvdcss_VER}.tar.gz
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/libdvd
CONFIGURE_COMMAND ac_cv_path_GIT= <SOURCE_DIR>/configure
--target=${HOST_ARCH}
@@ -135,7 +135,7 @@ else()
else()
ExternalProject_Add(dvdcss
URL ${LIBDVDCSS_URL}
- DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/downloads
+ DOWNLOAD_DIR ${TARBALL_DIR}
DOWNLOAD_NAME libdvdcss-${libdvdcss_VER}.tar.gz
CMAKE_ARGS
${LIBDVD_ADDITIONAL_ARGS}
@@ -154,7 +154,7 @@ else()
set(DVDREAD_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdread.a)
ExternalProject_Add(dvdread URL ${LIBDVDREAD_URL}
DOWNLOAD_NAME libdvdread-${libdvdread_VER}.tar.gz
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/libdvd
CONFIGURE_COMMAND ac_cv_path_GIT= <SOURCE_DIR>/configure
--target=${HOST_ARCH}
@@ -177,7 +177,7 @@ else()
else()
ExternalProject_Add(dvdread
URL ${LIBDVDREAD_URL}
- DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/downloads
+ DOWNLOAD_DIR ${TARBALL_DIR}
DOWNLOAD_NAME libdvdread-${libdvdread_VER}.tar.gz
CMAKE_ARGS
${LIBDVD_ADDITIONAL_ARGS}
@@ -199,7 +199,7 @@ else()
set(DVDNAV_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdnav.a)
ExternalProject_Add(dvdnav URL ${LIBDVDNAV_URL}
DOWNLOAD_NAME libdvdnav-${libdvdnav_VER}.tar.gz
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/libdvd
CONFIGURE_COMMAND ac_cv_path_GIT= <SOURCE_DIR>/configure
--target=${HOST_ARCH}
@@ -226,7 +226,7 @@ else()
set(DVDNAV_LIBRARY ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/libdvd/lib/libdvdnav.lib)
ExternalProject_Add(dvdnav
URL ${LIBDVDNAV_URL}
- DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/project/BuildDependencies/downloads
+ DOWNLOAD_DIR ${TARBALL_DIR}
DOWNLOAD_NAME libdvdnav-${libdvdnav_VER}.tar.gz
CMAKE_ARGS
${LIBDVD_ADDITIONAL_ARGS}
diff --git a/cmake/modules/FindRapidJSON.cmake b/cmake/modules/FindRapidJSON.cmake
index 7a1168b17f..699d325d19 100644
--- a/cmake/modules/FindRapidJSON.cmake
+++ b/cmake/modules/FindRapidJSON.cmake
@@ -33,7 +33,7 @@ if(ENABLE_INTERNAL_RapidJSON)
set(RapidJSON_INCLUDE_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/include)
externalproject_add(rapidjson
URL ${RapidJSON_URL}
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/rapidjson
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
diff --git a/cmake/modules/FindSpdlog.cmake b/cmake/modules/FindSpdlog.cmake
index 685556de90..aa57d87a78 100644
--- a/cmake/modules/FindSpdlog.cmake
+++ b/cmake/modules/FindSpdlog.cmake
@@ -40,7 +40,7 @@ if(ENABLE_INTERNAL_SPDLOG)
externalproject_add(spdlog
URL ${SPDLOG_URL}
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/spdlog
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}
-DCMAKE_CXX_EXTENSIONS=${CMAKE_CXX_EXTENSIONS}
diff --git a/cmake/modules/FindUdfread.cmake b/cmake/modules/FindUdfread.cmake
index 237e270138..0223a190fc 100644
--- a/cmake/modules/FindUdfread.cmake
+++ b/cmake/modules/FindUdfread.cmake
@@ -47,7 +47,7 @@ if(ENABLE_INTERNAL_UDFREAD)
externalproject_add(udfread
URL ${UDFREAD_URL}
DOWNLOAD_NAME libudfread-${UDFREAD_VER}.tar.gz
- DOWNLOAD_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download
+ DOWNLOAD_DIR ${TARBALL_DIR}
PREFIX ${CORE_BUILD_DIR}/libudfread
CONFIGURE_COMMAND autoreconf -vif &&
./configure
diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake
index 9abb809d62..c66743cfc8 100644
--- a/cmake/scripts/common/ArchSetup.cmake
+++ b/cmake/scripts/common/ArchSetup.cmake
@@ -74,6 +74,11 @@ if(NOT EXISTS ${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/ArchSetup.cm
endif()
include(${CMAKE_SOURCE_DIR}/cmake/scripts/${CORE_SYSTEM_NAME}/ArchSetup.cmake)
+# No TARBALL_DIR given, or no arch specific default set
+if(NOT TARBALL_DIR)
+ set(TARBALL_DIR ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/download)
+endif()
+
message(STATUS "Core system type: ${CORE_SYSTEM_NAME}")
message(STATUS "Platform: ${CORE_PLATFORM_NAME}")
message(STATUS "CPU: ${CPU}, ARCH: ${ARCH}")
diff --git a/cmake/scripts/darwin_embedded/ArchSetup.cmake b/cmake/scripts/darwin_embedded/ArchSetup.cmake
index b4d4d1b82a..0a47345086 100644
--- a/cmake/scripts/darwin_embedded/ArchSetup.cmake
+++ b/cmake/scripts/darwin_embedded/ArchSetup.cmake
@@ -47,6 +47,10 @@ set(CMAKE_XCODE_ATTRIBUTE_INLINES_ARE_PRIVATE_EXTERN OFF)
set(CMAKE_XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN OFF)
set(CMAKE_XCODE_ATTRIBUTE_COPY_PHASE_STRIP OFF)
+if(NOT TARBALL_DIR)
+ set(TARBALL_DIR "/Users/Shared/xbmc-depends/xbmc-tarballs")
+endif()
+
include(cmake/scripts/darwin/Macros.cmake)
enable_arc()
diff --git a/cmake/scripts/osx/ArchSetup.cmake b/cmake/scripts/osx/ArchSetup.cmake
index 0ea19e165e..234ca86750 100644
--- a/cmake/scripts/osx/ArchSetup.cmake
+++ b/cmake/scripts/osx/ArchSetup.cmake
@@ -23,6 +23,10 @@ else()
endif()
endif()
+if(NOT TARBALL_DIR)
+ set(TARBALL_DIR "/Users/Shared/xbmc-depends/xbmc-tarballs")
+endif()
+
set(CMAKE_OSX_ARCHITECTURES ${CPU})
# Additional SYSTEM_DEFINES
diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake
index b948437231..dfe53bf76a 100644
--- a/cmake/scripts/windows/ArchSetup.cmake
+++ b/cmake/scripts/windows/ArchSetup.cmake
@@ -38,6 +38,10 @@ list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
# dependencies
list(PREPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})
+if(NOT TARBALL_DIR)
+ set(TARBALL_DIR "${CMAKE_SOURCE_DIR}/project/BuildDependencies/downloads")
+endif()
+
# -------- Compiler options ---------
add_options(CXX ALL_BUILDS "/wd\"4996\"")
diff --git a/cmake/scripts/windowsstore/ArchSetup.cmake b/cmake/scripts/windowsstore/ArchSetup.cmake
index 0b8171aae8..b31a30a346 100644
--- a/cmake/scripts/windowsstore/ArchSetup.cmake
+++ b/cmake/scripts/windowsstore/ArchSetup.cmake
@@ -54,6 +54,9 @@ list(APPEND CMAKE_LIBRARY_PATH ${MINGW_LIBS_DIR}/bin)
# dependencies
list(PREPEND CMAKE_PREFIX_PATH ${DEPENDENCIES_DIR})
+if(NOT TARBALL_DIR)
+ set(TARBALL_DIR "${CMAKE_SOURCE_DIR}/project/BuildDependencies/downloads")
+endif()
# -------- Compiler options ---------