aboutsummaryrefslogtreecommitdiff
path: root/cmake/scripts/common
AgeCommit message (Collapse)Author
2023-03-01Merge pull request #22873 from CastagnaIT/addon_build_group_sourcesStefano Gottardo
[cmake][addons] Group sources by folder
2023-02-26[cmake][addons] Group sources by folderCastagnaIT
2023-02-22[cmake] set minimum required CMake version to 3.12 everywhereRechi
2023-02-19[cmake] drop disabling compiler warningsRechi
2022-12-24[cmake][win] BUILD_DEP_TARGET macro pass project compiler flags throughfuzzard
We dont use a toolchain for windows (unlike most other unix platforms), so manually pass project compiler flags through to externalproject_add calls for windows cmake projects
2022-09-30[cmake] BUILD_DEP_TARGET macro: Support RelwithDebInfofuzzard
2022-09-28[cmake] dependent_option functionfuzzard
This function allows us to handle in a generic way our use of internal lib state, and to then allow it to be overridden more easily by the user. cmake_dependent_option has proven too restrictive for our use of it.
2022-09-28[cmake] modulehelper function to get only version from a specific VERSION filefuzzard
The use of this is to allow a find module to get a version of a dependency from a VERSION file without smashing the find module SETUP_BUILD_VARS variables to allow us to provide a version to a find_package call of the dependency
2022-08-13[cmake][addons] allow passing extra args to built addon dependenciesfuzzard
Allows a user to pass through cmake arguments to all addon dependencies that are built Be aware, this is a global addition, and will be passed through to all addons built. Usage: -DADDON_EXTRA_ARGS="-Ddefine1=1 -Ddefine2=2" The arguments will be passed through as a list (ie -Ddefine1=1;-Ddefine2=2) to all addon dependencies built, and will be accessible via their CMakelists.txt files an example is with visualization.projectm. If a user wishes to set -DAPP_RENDER_SYSTEM=gles for the projectm dependency to build projectm as gles compatible. Currently this can be done with a toolchain file, but a user cant set -DAPP_RENDER_SYSTEM=gles as art of their cmake stanza to build the addon, as dependencies are passed through filtered lists, of which APP_RENDER_SYSTEM isnt specifically passed through. https://github.com/xbmc/visualization.projectm/issues/87 This solution provides a more generic way to pass through arguments to cmake dependencies without us explicitly handling each option in HandleDepends.cmake
2022-08-04[cmake][addons] enable cpu arch specific flags for flags.txt usagefuzzard
Allows us to append arch specific flags to platform generic deps eg, allow flags-arm64.txt and flags-x86_64.txt to append to extraflags passed to a cmake based dep only when the specific arch type of the platform is built Many platforms have the ability for multiple arch (osx x86_64/arm64, android armv7/aarch64, etc) So this allows us to provide targeted arch specific flags where appropriate This APPENDS to any flags found in flags.txt of a dep. flags.txt continues to hold any flags that are common across all platform arch types.
2022-08-03Merge pull request #21669 from basilgello/unpin-local-tarballsVasyl Gello
2022-08-02CMake:‌ Allow overriding the hashsums of local tarballVasyl Gello
The local tarballs specified via custom MODULE_URL can be different from what is pinned in 'tools/depends/target/*/*-VERSION' files. This manifested during preparation of 20.0 Alpha 2 build in Debian where libdvd* tarballs are custom. Now specifying MODULE_HASH along with MODULE_URL works as expected. Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
2022-07-13Merge pull request #21666 from bkuhls/cross_host_can_execute_targetWolfgang Schupp
[cmake] Allow specifying HOST_CAN_EXECUTE_TARGET
2022-07-12[cmake] Allow specifying HOST_CAN_EXECUTE_TARGETBernd Kuhls
Executing the target binary will not work when cross-compiling to a uClibc-based target on a glibc-based host. https://github.com/xbmc/xbmc/commit/b9a0c7b1f402613e96876ccfec316831801352bd broke cross-compiling in this case: -- Found Python3: /home/buildroot/buildroot/output/per-package/kodi/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/python3.10 (found suitable exact version "3.10.5") found components: Development Development.Module Development.Embed -- Could NOT find Python3 (missing: Interpreter) (Required is exact version "3.10") Reason given by package: Interpreter: Cannot run the interpreter "/home/buildroot/buildroot/output/per-package/kodi/host/x86_64-buildroot-linux-uclibc/sysroot/usr/bin/python3.10" $ file /home/buildroot/buildroot/output/per-package/kodi/host/x86_64-buildroot-linux-uclibc/sysroot/usr/bin/python3.10 /home/buildroot/buildroot/output/per-package/kodi/host/x86_64-buildroot-linux-uclibc/sysroot/usr/bin/python3.10: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld64-uClibc.so.0, not stripped This patch allows to force -DHOST_CAN_EXECUTE_TARGET=FALSE to avoid executing the target version of python3 although the host version was set in configure options: -DPYTHON_EXECUTABLE=/home/buildroot/buildroot/output/per-package/kodi/host/bin/python3.10 $ file /home/buildroot/buildroot/output/per-package/kodi/host/bin/python3.10 /home/buildroot/buildroot/output/per-package/kodi/host/bin/python3.10: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=0502eef4c126feb4162aea6d36f321387f2a58fc, for GNU/Linux 3.2.0, with debug_info, not stripped
2022-07-11[cmake] fix blacklisted files regexenen92
2022-06-25[cmakebuildsys] disable xcode legacy buildsystemfuzzard
2022-06-25[cmake] modulehelper set default generator for VS/xcode externalproject_add ↵fuzzard
calls
2022-06-25[cmake] modulehelper safety variable cleanupfuzzard
2022-06-22[cmake] modulehelper create macro to unset generic build variablesfuzzard
2022-06-19[cmake] refactor module helpers function/macrosfuzzard
generalise functions/macros further to more easily accommodate the difference between a native and a target lib/tool and the relevant source locations extract download/url steps from externalproject_add to allow override of in-tree source step. update comments
2022-06-17[cmake] modulehelpers allow setting GENERATOR for externalproject_add callfuzzard
2022-06-17[cmake] modulehelpers extend more overrides of variablesfuzzard
2022-06-17[cmake] move host tool find modules to buildtools folder - Nasmfuzzard
2022-06-17[cmake] modulehelper create generate_patchcommand functionfuzzard
refactor patch handling to deal with windows/unix differences and find patch module
2022-06-02[cmake] refactor BUILD_DEP_TARGET to utilise generator expressionsfuzzard
2022-06-02[cmake] pass cmake_prefix_path through to internaldep build functionfuzzard
Prepend depends_path to cmake_prefix_path for find_package/program/etc calls to search our depends_path first Pass through cmake_prefix_path to internal build functions for cmake based build systems
2022-06-02[cmake] BUILD_DEP_TARGET set BYPRODUCT for cmake based buildsfuzzard
Required to make ninja play nice when using ENABLE_INTERNAL_<LIB>
2022-05-25[cmake] ENABLE_INTERNAL_TAGLIB to build taglib internallyfuzzard
2022-05-25Merge pull request #21436 from fuzzard/cmake_findpatchfuzzard
[cmake] Flesh out FindPatch module for windows use
2022-05-25[cmake] fixup buildtype after #21043fuzzard
set default postfix for all android libs (similar to apple) if <MODULE>_RELEASE_TYPE is forced, remove the alternative <MODULE>_LIBRARY_<TYPE> build can now handle crossguid -dbg postfix, so allow it.
2022-05-24[cmake] Flesh out FindPatch module for windows usefuzzard
Windows we want to preference git patch, so adapt find module to check specifically for it. Update other find modules importing FindPatch.cmake to actual find_package calls
2022-05-23[cmake] BUILD_DEP_TARGET Provide buildtype for cmake buildfuzzard
Provides build_type to internal build targets that use cmake. Allows a target to override (set <MODULE>_BUILD_TYPE) or to use the projects build type
2022-05-22Merge pull request #21332 from fuzzard/cmake_prefixfuzzard
[cmake] Assorted cmake fixes regarding Find Modules
2022-05-14[Windows] fix cmake find patch executable (prioritize use Git patch.exe)thexai
2022-04-30[cmake] refactor CMAKE_INSTALL_PREFIX into BUILD_DEP_TARGET macrofuzzard
set CMAKE_INSTALL_PREFIX in BUILD_DEP_TARGET, and use DEPENDS_PATH for location
2022-04-30[cmake] rename function get_archive_name to get_versionfile_datafuzzard
rename to reflect current usage. Old name was from my initial implementation and it no longer reflects what the function does.
2022-04-30[cmake] typo fixup.fuzzard
2022-04-28[cmake] rename CORE_HOST_IS_TARGET to HOST_CAN_EXECUTE_TARGETfuzzard
We are now in a time where some platforms/archs can execute "foreign" (x86_64) arch code locally (Apple via Rosetta, Windows on arm). Rename CORE_HOST_IS_TARGET to HOST_CAN_EXECUTE_TARGET to allow platforms ArchSetup to set and therefore execute tests if desired.
2022-04-02[cmake] extract common CMAKE_INSTALL_LIBDIR to all cmake based internal dep ↵fuzzard
builds
2022-03-24[cmake] BUILD_DEP_TARGET add DEP_BUILDENV to CONFIGURE_COMMAND invocationsfuzzard
Sets environment variables for autoconf based build systems for externalproject_add build of a dependency
2022-03-21[cmake] rework DEBUG_POSTFIX usage in SETUP_BUILD_VARS macrofuzzard
2022-03-12[cmake] FindSpdlog enable windows ENABLE_INTERNAL_SPDLOG buildfuzzard
2022-03-07[cmake] BUILD_DEP_TARGET append Toolchain when CMAKE_ARGS passedfuzzard
If a toolchain file is provided, pass it along to any internal dep cmake based build systems.
2022-03-07[cmake] BUILD_DEP_TARGET move include and add docinfofuzzard
2022-03-07[cmake] SETUP_BUILD_VARS create MODULE_LIBRARY/INCLUDE_DIR/VER variablesfuzzard
2022-03-07[cmake] ModuleHelper read BYPRODUCT from VERSION filesfuzzard
2022-03-07[cmake] create macro to handle module externalproject_add calls for internal ↵fuzzard
deps refactor out usage of externalproject_add to a macro for internal dep building
2022-03-02[cmake] introduce module download macrofuzzard
Macro will factor out repetitive code for internal dependency builds
2022-02-06Merge pull request #20947 from lrusak/cppcheck-updatesLukas Rusak
[cmake] improve cppcheck behaviour for CI
2022-02-03[cmake] cppcheck: add suppression xml to remove unwanted foldersLukas Rusak