From dbb2844ed98f91395856ac3def258f170d78a819 Mon Sep 17 00:00:00 2001 From: Ray molenkamp Date: Tue, 28 Nov 2023 01:14:15 +0100 Subject: [PATCH] Cleanup: CMake: Modernize bf_functions dependencies Pretty straightforward - Remove any bf_functions paths from INC - Add a dependency though LIB when missing context: https://devtalk.blender.org/t/cmake-cleanup/30260 Pull Request: https://projects.blender.org/blender/blender/pulls/115427 --- source/blender/blenkernel/CMakeLists.txt | 3 +-- source/blender/depsgraph/CMakeLists.txt | 2 +- source/blender/draw/CMakeLists.txt | 2 +- source/blender/editors/curves/CMakeLists.txt | 2 +- source/blender/editors/geometry/CMakeLists.txt | 2 +- source/blender/editors/interface/CMakeLists.txt | 2 +- source/blender/editors/mesh/CMakeLists.txt | 2 +- source/blender/editors/object/CMakeLists.txt | 2 +- source/blender/editors/sculpt_paint/CMakeLists.txt | 2 +- source/blender/editors/space_node/CMakeLists.txt | 2 +- source/blender/editors/space_spreadsheet/CMakeLists.txt | 2 +- source/blender/functions/CMakeLists.txt | 3 ++- source/blender/geometry/CMakeLists.txt | 2 +- source/blender/modifiers/CMakeLists.txt | 2 +- source/blender/nodes/CMakeLists.txt | 3 +-- source/blender/nodes/composite/CMakeLists.txt | 2 +- source/blender/nodes/function/CMakeLists.txt | 3 +-- source/blender/nodes/geometry/CMakeLists.txt | 3 +-- source/blender/nodes/shader/CMakeLists.txt | 3 +-- source/blender/simulation/CMakeLists.txt | 2 +- 20 files changed, 21 insertions(+), 25 deletions(-) diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 2debd261c5f..0f9e43f1a09 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -9,7 +9,6 @@ set(INC ../blentranslation ../bmesh ../draw - ../functions ../gpencil_modifiers_legacy ../gpu ../ikplugin @@ -547,7 +546,7 @@ set(LIB PRIVATE bf::dna bf_draw PRIVATE bf::extern::curve_fit_nd - bf_functions + PRIVATE bf::functions bf_gpencil_modifiers_legacy bf_gpu bf_ikplugin diff --git a/source/blender/depsgraph/CMakeLists.txt b/source/blender/depsgraph/CMakeLists.txt index ae5d5d55d8b..06c0270d434 100644 --- a/source/blender/depsgraph/CMakeLists.txt +++ b/source/blender/depsgraph/CMakeLists.txt @@ -7,7 +7,6 @@ set(INC ../blenkernel ../bmesh ../draw - ../functions ../makesrna ../modifiers ../sequencer @@ -152,6 +151,7 @@ set(LIB bf_blenkernel PRIVATE bf::blenlib PRIVATE bf::dna + PRIVATE bf::functions PRIVATE bf::intern::atomic PRIVATE bf::intern::guardedalloc ) diff --git a/source/blender/draw/CMakeLists.txt b/source/blender/draw/CMakeLists.txt index 953084554b6..9ad872d99e4 100644 --- a/source/blender/draw/CMakeLists.txt +++ b/source/blender/draw/CMakeLists.txt @@ -12,7 +12,6 @@ set(INC ../bmesh ../editors/include ../editors/space_view3d - ../functions ../gpu ../gpu/intern ../makesrna @@ -351,6 +350,7 @@ set(LIB PRIVATE bf::blenlib PRIVATE bf::depsgraph PRIVATE bf::dna + PRIVATE bf::functions PRIVATE bf::imbuf PRIVATE bf::intern::clog PRIVATE bf::intern::guardedalloc diff --git a/source/blender/editors/curves/CMakeLists.txt b/source/blender/editors/curves/CMakeLists.txt index e4639aedef1..4a12ceb32b4 100644 --- a/source/blender/editors/curves/CMakeLists.txt +++ b/source/blender/editors/curves/CMakeLists.txt @@ -6,7 +6,6 @@ set(INC ../include ../../blenkernel ../../blentranslation - ../../functions ../../geometry ../../gpu ../../makesrna @@ -36,6 +35,7 @@ set(LIB PRIVATE bf::blenlib PRIVATE bf::depsgraph PRIVATE bf::dna + PRIVATE bf::functions PRIVATE bf::intern::clog PRIVATE bf::intern::guardedalloc ) diff --git a/source/blender/editors/geometry/CMakeLists.txt b/source/blender/editors/geometry/CMakeLists.txt index f7eafe92c4b..c0f3b6b1d59 100644 --- a/source/blender/editors/geometry/CMakeLists.txt +++ b/source/blender/editors/geometry/CMakeLists.txt @@ -8,7 +8,6 @@ set(INC ../../blenkernel ../../blentranslation ../../bmesh - ../../functions ../../makesrna ../../nodes ../../windowmanager @@ -35,6 +34,7 @@ set(LIB PRIVATE bf::depsgraph PRIVATE bf::dna bf_editor_object + PRIVATE bf::functions PRIVATE bf::intern::guardedalloc bf_windowmanager ) diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt index 797e4078e60..ef083529421 100644 --- a/source/blender/editors/interface/CMakeLists.txt +++ b/source/blender/editors/interface/CMakeLists.txt @@ -10,7 +10,6 @@ set(INC ../../blenloader ../../blentranslation ../../draw - ../../functions ../../gpu ../../makesrna ../../nodes @@ -100,6 +99,7 @@ set(LIB PRIVATE bf::depsgraph PRIVATE bf::dna bf_editor_datafiles + PRIVATE bf::functions PRIVATE bf::imbuf PRIVATE bf::intern::guardedalloc PRIVATE bf::animrig diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt index adadfb97669..4b9308a2f98 100644 --- a/source/blender/editors/mesh/CMakeLists.txt +++ b/source/blender/editors/mesh/CMakeLists.txt @@ -9,7 +9,6 @@ set(INC ../../blentranslation ../../bmesh ../../draw - ../../functions ../../geometry ../../gpu ../../makesrna @@ -65,6 +64,7 @@ set(LIB PRIVATE bf::blenlib PRIVATE bf::depsgraph PRIVATE bf::dna + PRIVATE bf::functions PRIVATE bf::imbuf PRIVATE bf::intern::clog PRIVATE bf::intern::guardedalloc diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt index db6bb5afac4..05a3a9b480c 100644 --- a/source/blender/editors/object/CMakeLists.txt +++ b/source/blender/editors/object/CMakeLists.txt @@ -8,7 +8,6 @@ set(INC ../../blenkernel ../../blentranslation ../../bmesh - ../../functions ../../gpencil_modifiers_legacy ../../gpu ../../ikplugin @@ -67,6 +66,7 @@ set(LIB PRIVATE bf::dna bf_editor_mesh bf_editor_grease_pencil + PRIVATE bf::functions PRIVATE bf::imbuf PRIVATE bf::intern::clog PRIVATE bf::intern::guardedalloc diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt index 08efb916052..a59069b2437 100644 --- a/source/blender/editors/sculpt_paint/CMakeLists.txt +++ b/source/blender/editors/sculpt_paint/CMakeLists.txt @@ -9,7 +9,6 @@ set(INC ../../blentranslation ../../bmesh ../../draw - ../../functions ../../geometry ../../gpu ../../makesrna @@ -98,6 +97,7 @@ set(LIB PRIVATE bf::blenlib PRIVATE bf::depsgraph PRIVATE bf::dna + PRIVATE bf::functions PRIVATE bf::imbuf PRIVATE bf::intern::atomic PRIVATE bf::intern::clog diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt index 6cde5dfe6d6..ad17064ec71 100644 --- a/source/blender/editors/space_node/CMakeLists.txt +++ b/source/blender/editors/space_node/CMakeLists.txt @@ -10,7 +10,6 @@ set(INC ../../blentranslation ../../compositor ../../draw - ../../functions ../../geometry ../../gpu ../../makesrna @@ -56,6 +55,7 @@ set(LIB PRIVATE bf::depsgraph PRIVATE bf::dna bf_editor_screen + PRIVATE bf::functions PRIVATE bf::imbuf PRIVATE bf::intern::guardedalloc extern_fmtlib diff --git a/source/blender/editors/space_spreadsheet/CMakeLists.txt b/source/blender/editors/space_spreadsheet/CMakeLists.txt index dba272f8698..85e9c7e8976 100644 --- a/source/blender/editors/space_spreadsheet/CMakeLists.txt +++ b/source/blender/editors/space_spreadsheet/CMakeLists.txt @@ -8,7 +8,6 @@ set(INC ../../blenloader ../../blentranslation ../../bmesh - ../../functions ../../gpu ../../makesrna ../../nodes @@ -53,6 +52,7 @@ set(LIB PRIVATE bf::blenlib PRIVATE bf::depsgraph PRIVATE bf::dna + PRIVATE bf::functions PRIVATE bf::intern::guardedalloc ) diff --git a/source/blender/functions/CMakeLists.txt b/source/blender/functions/CMakeLists.txt index 6e2f38bd142..43783df6ab4 100644 --- a/source/blender/functions/CMakeLists.txt +++ b/source/blender/functions/CMakeLists.txt @@ -3,7 +3,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later set(INC - . + PUBLIC . ) set(INC_SYS @@ -65,6 +65,7 @@ if(WITH_TBB) endif() blender_add_lib(bf_functions "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") +add_library(bf::functions ALIAS bf_functions) if(WITH_GTESTS) set(TEST_INC diff --git a/source/blender/geometry/CMakeLists.txt b/source/blender/geometry/CMakeLists.txt index 3e1da4cc469..e3485637444 100644 --- a/source/blender/geometry/CMakeLists.txt +++ b/source/blender/geometry/CMakeLists.txt @@ -6,7 +6,6 @@ set(INC . ../blenkernel ../blentranslation - ../functions ../makesrna ../../../intern/eigen ) @@ -74,6 +73,7 @@ set(LIB bf_blenkernel PRIVATE bf::blenlib PRIVATE bf::dna + PRIVATE bf::functions PRIVATE bf::intern::guardedalloc ) diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index ef9ff57b606..33fce46ad89 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -10,7 +10,6 @@ set(INC ../blentranslation ../bmesh ../editors/include - ../functions ../geometry ../makesrna ../nodes @@ -110,6 +109,7 @@ set(LIB PRIVATE bf::blenlib PRIVATE bf::depsgraph PUBLIC bf::dna + PRIVATE bf::functions PRIVATE bf::intern::guardedalloc ) diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 9850d1cdbd4..03762743051 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -58,7 +58,6 @@ set(INC ../blenloader ../blentranslation ../bmesh - ../functions ../geometry ../gpu ../makesrna @@ -125,7 +124,7 @@ set(LIB bf_bmesh PRIVATE bf::depsgraph PRIVATE bf::dna - bf_functions + PRIVATE bf::functions PRIVATE bf::imbuf PRIVATE bf::intern::guardedalloc bf_nodes_composite diff --git a/source/blender/nodes/composite/CMakeLists.txt b/source/blender/nodes/composite/CMakeLists.txt index c10cb2e8d88..17d345016d1 100644 --- a/source/blender/nodes/composite/CMakeLists.txt +++ b/source/blender/nodes/composite/CMakeLists.txt @@ -9,7 +9,6 @@ set(INC ../../editors/include ../../blenkernel ../../blentranslation - ../../functions ../../gpu ../../makesrna ../../render @@ -128,6 +127,7 @@ set(LIB PRIVATE bf::blenlib PRIVATE bf::depsgraph PRIVATE bf::dna + PRIVATE bf::functions PRIVATE bf::imbuf PRIVATE bf::intern::guardedalloc bf_realtime_compositor diff --git a/source/blender/nodes/function/CMakeLists.txt b/source/blender/nodes/function/CMakeLists.txt index 4de72835da4..ef9d8ef8aca 100644 --- a/source/blender/nodes/function/CMakeLists.txt +++ b/source/blender/nodes/function/CMakeLists.txt @@ -9,7 +9,6 @@ set(INC ../../blenkernel ../../blentranslation ../../editors/include - ../../functions ../../makesrna ../../windowmanager ) @@ -53,7 +52,7 @@ set(SRC set(LIB PRIVATE bf::blenlib PRIVATE bf::dna - bf_functions + PRIVATE bf::functions PRIVATE bf::intern::guardedalloc ) diff --git a/source/blender/nodes/geometry/CMakeLists.txt b/source/blender/nodes/geometry/CMakeLists.txt index 5d304d9def2..05502730568 100644 --- a/source/blender/nodes/geometry/CMakeLists.txt +++ b/source/blender/nodes/geometry/CMakeLists.txt @@ -10,7 +10,6 @@ set(INC ../../blenkernel ../../blentranslation ../../bmesh - ../../functions ../../geometry ../../gpu ../../makesrna @@ -213,7 +212,7 @@ set(LIB bf_bmesh PRIVATE bf::depsgraph PRIVATE bf::dna - bf_functions + PRIVATE bf::functions bf_geometry PRIVATE bf::imbuf PRIVATE bf::intern::guardedalloc diff --git a/source/blender/nodes/shader/CMakeLists.txt b/source/blender/nodes/shader/CMakeLists.txt index 4385cd1be60..cd578b83623 100644 --- a/source/blender/nodes/shader/CMakeLists.txt +++ b/source/blender/nodes/shader/CMakeLists.txt @@ -9,7 +9,6 @@ set(INC ../../blenkernel ../../blentranslation ../../editors/include - ../../functions ../../gpu ../../makesrna ../../render @@ -128,7 +127,7 @@ set(LIB PRIVATE bf::blenlib PRIVATE bf::depsgraph PRIVATE bf::dna - bf_functions + PRIVATE bf::functions PRIVATE bf::imbuf PRIVATE bf::intern::clog PRIVATE bf::intern::guardedalloc diff --git a/source/blender/simulation/CMakeLists.txt b/source/blender/simulation/CMakeLists.txt index dc60d0a137a..f3d2636f0e0 100644 --- a/source/blender/simulation/CMakeLists.txt +++ b/source/blender/simulation/CMakeLists.txt @@ -6,7 +6,6 @@ set(INC . intern ../blenkernel - ../functions ../makesrna ../nodes ) @@ -33,6 +32,7 @@ set(LIB PRIVATE bf::blenlib PRIVATE bf::depsgraph PRIVATE bf::dna + PRIVATE bf::functions PRIVATE bf::imbuf PRIVATE bf::intern::guardedalloc )