aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2024-05-17 22:38:29 +1000
committerfuzzard <fuzzard@kodi.tv>2024-06-22 14:06:06 +1000
commitf2a75cd78b697269b02661f1de637e6fac43fabc (patch)
tree7946cd678df39df521170b84b50f9d9ac8cec098 /cmake
parent60b9f336fa4fb6d089f6901a75c3c4981ca9fcb0 (diff)
[cmake] remove several non target globals
Diffstat (limited to 'cmake')
-rw-r--r--cmake/scripts/common/ArchSetup.cmake1
-rw-r--r--cmake/scripts/common/Macros.cmake23
2 files changed, 1 insertions, 23 deletions
diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake
index a83d2ae198..0461496bf5 100644
--- a/cmake/scripts/common/ArchSetup.cmake
+++ b/cmake/scripts/common/ArchSetup.cmake
@@ -8,7 +8,6 @@
# ARCH - the system architecture
# ARCH_DEFINES - list of compiler definitions for this architecture
# SYSTEM_DEFINES - list of compiler definitions for this system
-# DEP_DEFINES - compiler definitions for system dependencies (e.g. LIRC)
# + the results of compiler tests etc.
# workaround a bug in older cmake, where binutils wouldn't be set after deleting CMakeCache.txt
diff --git a/cmake/scripts/common/Macros.cmake b/cmake/scripts/common/Macros.cmake
index 3b92ebe913..57f5ef8712 100644
--- a/cmake/scripts/common/Macros.cmake
+++ b/cmake/scripts/common/Macros.cmake
@@ -342,15 +342,6 @@ function(copy_files_from_filelist_to_buildtree pattern)
set(install_data ${install_data} PARENT_SCOPE)
endfunction()
-# helper macro to set modified variables in parent scope
-macro(export_dep)
- set(SYSTEM_INCLUDES ${SYSTEM_INCLUDES} PARENT_SCOPE)
- set(DEPLIBS ${DEPLIBS} PARENT_SCOPE)
- set(DEP_DEFINES ${DEP_DEFINES} PARENT_SCOPE)
- set(${depup}_FOUND ${${depup}_FOUND} PARENT_SCOPE)
- mark_as_advanced(${depup}_LIBRARIES)
-endmacro()
-
# split dependency specification to name and version
# Arguments:
# depspec dependency specification that can optionally include a required
@@ -393,17 +384,11 @@ endmacro()
# Arguments:
# dep_list One or many dependency specifications (see split_dependency_specification)
# for syntax). The dependency name is used uppercased as variable prefix.
-# On return:
-# dependencies added to ${SYSTEM_INCLUDES}, ${DEPLIBS} and ${DEP_DEFINES}
function(core_require_dep)
foreach(depspec ${ARGN})
split_dependency_specification(${depspec} dep version)
find_package_with_ver(${dep} ${version} REQUIRED)
string(TOUPPER ${dep} depup)
- list(APPEND SYSTEM_INCLUDES ${${depup}_INCLUDE_DIRS})
- list(APPEND DEPLIBS ${${depup}_LIBRARIES})
- list(APPEND DEP_DEFINES ${${depup}_DEFINITIONS})
- export_dep()
# We dont want to add a build tool
if (NOT ${depspec} IN_LIST optional_buildtools AND NOT ${depspec} IN_LIST required_buildtools)
@@ -432,8 +417,6 @@ endmacro()
# Arguments:
# dep_list One or many dependency specifications (see split_dependency_specification)
# for syntax). The dependency name is used uppercased as variable prefix.
-# On return:
-# dependency optionally added to ${SYSTEM_INCLUDES}, ${DEPLIBS} and ${DEP_DEFINES}
function(core_optional_dep)
foreach(depspec ${ARGN})
set(_required False)
@@ -446,12 +429,8 @@ function(core_optional_dep)
set(_required True)
endif()
- if(${depup}_FOUND OR TARGET kodi::${dep})
- list(APPEND SYSTEM_INCLUDES ${${depup}_INCLUDE_DIRS})
- list(APPEND DEPLIBS ${${depup}_LIBRARIES})
- list(APPEND DEP_DEFINES ${${depup}_DEFINITIONS})
+ if(TARGET kodi::${dep})
set(final_message ${final_message} "${depup} enabled: Yes")
- export_dep()
# We dont want to add a build tool
if (NOT ${depspec} IN_LIST optional_buildtools AND NOT ${depspec} IN_LIST required_buildtools)