From d3fdda7ba99ff591872780d952454d577259faa3 Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Sun, 9 Feb 2020 10:17:41 +0100 Subject: [PATCH] Forward DESKTOP_APP_USE_PACKAGED_RLOTTIE to project. Use pkg-config to find packaged rlottie. Signed-off-by: Vitaly Zaitsev --- external/rlottie/CMakeLists.txt | 6 ++++-- options.cmake | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/external/rlottie/CMakeLists.txt b/external/rlottie/CMakeLists.txt index 610849e..7ca2e08 100644 --- a/external/rlottie/CMakeLists.txt +++ b/external/rlottie/CMakeLists.txt @@ -8,8 +8,10 @@ if (DESKTOP_APP_USE_PACKAGED_RLOTTIE) add_library(external_rlottie INTERFACE IMPORTED GLOBAL) add_library(desktop-app::external_rlottie ALIAS external_rlottie) - find_package(rlottie REQUIRED) - target_link_libraries(external_rlottie INTERFACE rlottie::rlottie) + find_package(PkgConfig REQUIRED) + pkg_check_modules(RLOTTIE REQUIRED rlottie) + target_include_directories(external_rlottie INTERFACE ${RLOTTIE_INCLUDE_DIRS}) + target_link_libraries(external_rlottie INTERFACE ${RLOTTIE_LIBRARIES}) else() add_library(external_rlottie OBJECT) add_library(desktop-app::external_rlottie ALIAS external_rlottie) diff --git a/options.cmake b/options.cmake index 47102c0..46186c6 100644 --- a/options.cmake +++ b/options.cmake @@ -33,6 +33,13 @@ if (DESKTOP_APP_USE_PACKAGED_FONTS) ) endif() +if (DESKTOP_APP_USE_PACKAGED_RLOTTIE) + target_compile_definitions(common_options + INTERFACE + DESKTOP_APP_USE_PACKAGED_RLOTTIE + ) +endif() + if (WIN32) include(cmake/options_win.cmake) elseif (APPLE)