1
0
Fork 0

Forward DESKTOP_APP_USE_PACKAGED_RLOTTIE to project.

Use pkg-config to find packaged rlottie.

Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
Vitaly Zaitsev 2020-02-09 10:17:41 +01:00 committed by John Preston
parent f49e4f19bb
commit d3fdda7ba9
2 changed files with 11 additions and 2 deletions

View file

@ -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)

View file

@ -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)