From 78627af3f5f58a5ccabe5b9e1545d86b7eb21614 Mon Sep 17 00:00:00 2001 From: Nicholas Guriev Date: Mon, 14 Jun 2021 12:12:21 +0300 Subject: [PATCH] More targeted definition of DESKTOP_APP_USE_PACKAGED_RLOTTIE macro Exclude it from common options, define it only for necessarily targets. --- external/rlottie/CMakeLists.txt | 7 ++++++- options.cmake | 7 ------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/external/rlottie/CMakeLists.txt b/external/rlottie/CMakeLists.txt index 2ee5ac5..e19cbe2 100644 --- a/external/rlottie/CMakeLists.txt +++ b/external/rlottie/CMakeLists.txt @@ -22,7 +22,12 @@ if (DESKTOP_APP_USE_PACKAGED) endif() endif() -if (NOT rlottie_FOUND AND NOT RLOTTIE_FOUND) +if (rlottie_FOUND OR RLOTTIE_FOUND) + target_compile_definitions(external_rlottie + INTERFACE + DESKTOP_APP_USE_PACKAGED_RLOTTIE + ) +else() add_library(external_rlottie_bundled STATIC) init_target(external_rlottie_bundled "(external)") diff --git a/options.cmake b/options.cmake index 6a73f8b..10d8c89 100644 --- a/options.cmake +++ b/options.cmake @@ -77,13 +77,6 @@ if (DESKTOP_APP_USE_PACKAGED_FONTS) ) endif() -if (rlottie_FOUND OR RLOTTIE_FOUND) - target_compile_definitions(common_options - INTERFACE - DESKTOP_APP_USE_PACKAGED_RLOTTIE - ) -endif() - if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "") target_compile_definitions(common_options INTERFACE