Skip to content

Commit

Permalink
feat(cmake): add ENABLE_LOTTIE_PLUGIN
Browse files Browse the repository at this point in the history
Signed-off-by: Longtao Zhang <DragonBillow@outlook.com>
  • Loading branch information
cathaysia committed Dec 21, 2022
1 parent 7410ee9 commit c74af96
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ endif()

option(BUILD_SAMPLES "Build samples" OFF)
option(RMLUI_FREETYPE_EXTERNAL "Use external FreeType instead of by find_package" OFF)
option(RMLUI_RLOTTIE_EXTERNAL "Use external RLOTTIE" OFF)

set(SAMPLES_BACKEND "auto" CACHE STRING "Backend platform and renderer used for the samples.")
set_property(CACHE SAMPLES_BACKEND PROPERTY STRINGS auto Win32_GL2 Win32_VK X11_GL2 SDL_GL2 SDL_GL3 SDL_VK SDL_SDLrenderer SFML_GL2 GLFW_GL2 GLFW_GL3 GLFW_VK)
Expand Down Expand Up @@ -369,7 +370,12 @@ if(BUILD_LUA_BINDINGS)
endif()

# rlottie
if( ENABLE_LOTTIE_PLUGIN )
if( ENABLE_LOTTIE_PLUGIN AND RMLUI_RLOTTIE_EXTERNAL )
message(STATUS "use external rlottie")
list(APPEND CORE_LINK_LIBS rlottie::rlottie)
list(APPEND CORE_INCLUDE_DIRS rlottie::rlottie)
endif()
if( ENABLE_LOTTIE_PLUGIN AND NOT RMLUI_RLOTTIE_EXTERNAL)
# Try to find the rlottie library.
if(NOT DEFINED rlottie_DIR)
set(rlottie_DIR $ENV{RLOTTIE_DIR})
Expand Down

0 comments on commit c74af96

Please sign in to comment.