diff options
Diffstat (limited to 'recipes-bsp/isp-imx/isp-imx/0004-units-targets.cmake-fix-check-if-a-target-exists.patch')
| -rw-r--r-- | recipes-bsp/isp-imx/isp-imx/0004-units-targets.cmake-fix-check-if-a-target-exists.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/recipes-bsp/isp-imx/isp-imx/0004-units-targets.cmake-fix-check-if-a-target-exists.patch b/recipes-bsp/isp-imx/isp-imx/0004-units-targets.cmake-fix-check-if-a-target-exists.patch new file mode 100644 index 000000000..087f24090 --- /dev/null +++ b/recipes-bsp/isp-imx/isp-imx/0004-units-targets.cmake-fix-check-if-a-target-exists.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | From d7e06f57c067e50d86369577b8dc3bccdde6fd40 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Max Krummenacher <max.krummenacher@toradex.com> | ||
| 3 | Date: Fri, 25 Jul 2025 10:44:40 +0000 | ||
| 4 | Subject: [PATCH 4/5] units/targets.cmake: fix check if a target exists | ||
| 5 | |||
| 6 | | CMake Error at units/targets.cmake:35 (get_target_property): | ||
| 7 | | get_target_property() called with non-existent target "lib". | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | ||
| 11 | --- | ||
| 12 | units/targets.cmake | 9 +++------ | ||
| 13 | 1 file changed, 3 insertions(+), 6 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/units/targets.cmake b/units/targets.cmake | ||
| 16 | index 663a024d9129..d78dbf8b8a45 100755 | ||
| 17 | --- a/units/targets.cmake | ||
| 18 | +++ b/units/targets.cmake | ||
| 19 | @@ -32,8 +32,7 @@ add_dependencies(create_alldir ${module}_create_dir) | ||
| 20 | # Settings for target LIB | ||
| 21 | ############################################################################### | ||
| 22 | # check if lib target already exists and create it, this is to assure that only one target called lib will be generated | ||
| 23 | -get_target_property(LIB_TARGET lib TYPE) | ||
| 24 | -if(NOT LIB_TARGET) | ||
| 25 | +if(NOT TARGET lib) | ||
| 26 | add_custom_target(lib) | ||
| 27 | endif() | ||
| 28 | # the library itself is a dependency for the target lib | ||
| 29 | @@ -83,8 +82,7 @@ if(HAVE_PUBLIC_HEADERS) | ||
| 30 | endif() | ||
| 31 | |||
| 32 | # check if lib_install target already exists and create it | ||
| 33 | -get_target_property(LIB_INSTALL_TARGET lib_install TYPE) | ||
| 34 | -if(NOT LIB_INSTALL_TARGET) | ||
| 35 | +if(NOT TARGET lib_install) | ||
| 36 | add_custom_target(lib_install) | ||
| 37 | endif() | ||
| 38 | |||
| 39 | @@ -104,8 +102,7 @@ add_custom_target(${module}_copy_header | ||
| 40 | COMMENT "Copying Headers of ${module}") | ||
| 41 | |||
| 42 | # check if copy_header target already exists and create it | ||
| 43 | -get_target_property(COPY_HEADER_TARGET copy_header TYPE) | ||
| 44 | -if(NOT COPY_HEADER_TARGET) | ||
| 45 | +if(NOT TARGET copy_header) | ||
| 46 | add_custom_target(copy_header) | ||
| 47 | endif() | ||
| 48 | # if copy_header is selected, modulename_copy_header target must be created | ||
| 49 | -- | ||
| 50 | 2.42.0 | ||
| 51 | |||
