mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-04 13:38:21 +00:00
lottie: added cmake build system for lottie
Change-Id: I8e03709ae668bc221c4ec936317cf579d326876f
This commit is contained in:
parent
85a5463cc0
commit
d39ce3f62f
51
CMakeLists.txt
Normal file
51
CMakeLists.txt
Normal file
@ -0,0 +1,51 @@
|
||||
cmake_minimum_required( VERSION 3.2 )
|
||||
|
||||
#declare project
|
||||
project( lottie-player LANGUAGES C CXX )
|
||||
|
||||
#declare target
|
||||
add_library( lottie-player SHARED "" )
|
||||
|
||||
#declare alias so that library can be used inside the build tree, e.g. when testing
|
||||
add_library(lottie-player::lottie-player ALIAS lottie-player)
|
||||
|
||||
#declare target compilation options
|
||||
target_compile_options(lottie-player
|
||||
PUBLIC
|
||||
-std=c++11
|
||||
PRIVATE
|
||||
-Wall -fvisibility=hidden)
|
||||
|
||||
#declare dependancy
|
||||
set( CMAKE_THREAD_PREFER_PTHREAD TRUE )
|
||||
find_package( Threads )
|
||||
|
||||
target_link_libraries(lottie-player
|
||||
PUBLIC
|
||||
"${CMAKE_THREAD_LIBS_INIT}"
|
||||
)
|
||||
|
||||
#declare source and include files
|
||||
add_subdirectory(inc)
|
||||
add_subdirectory(src)
|
||||
|
||||
#install header
|
||||
install(FILES inc/lottieplayer.h DESTINATION include)
|
||||
|
||||
#install lib
|
||||
install( TARGETS lottie-player EXPORT lottie-player-targets
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
INCLUDES DESTINATION include
|
||||
)
|
||||
|
||||
#install config file.
|
||||
install( EXPORT lottie-player-targets
|
||||
FILE lottie-player.cmake
|
||||
NAMESPACE lottie-player::
|
||||
DESTINATION lib/cmake/lottie-player
|
||||
)
|
||||
|
||||
|
||||
#Register package in user's package registry
|
||||
export(PACKAGE lottie-player)
|
||||
4
inc/CMakeLists.txt
Normal file
4
inc/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
target_include_directories(lottie-player
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
4
src/CMakeLists.txt
Normal file
4
src/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
|
||||
add_subdirectory(vector)
|
||||
|
||||
add_subdirectory(lottie)
|
||||
14
src/lottie/CMakeLists.txt
Normal file
14
src/lottie/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
target_sources(lottie-player
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/lottieitem.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/lottieloader.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/lottiemodel.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/lottieparser.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/lottieplayer.cpp"
|
||||
)
|
||||
|
||||
target_include_directories(lottie-player
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
28
src/vector/CMakeLists.txt
Normal file
28
src/vector/CMakeLists.txt
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
add_subdirectory(freetype)
|
||||
|
||||
target_sources(lottie-player
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vdasher.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vbrush.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vbitmap.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vpainter.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vcompositionfunctions.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vdrawhelper.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vdrawhelper_sse2.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vregion.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vrle.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vpath.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vpathmesure.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vmatrix.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/velapsedtimer.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vdebug.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vinterpolator.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vbezier.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vraster.cpp"
|
||||
)
|
||||
|
||||
target_include_directories(lottie-player
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
11
src/vector/freetype/CMakeLists.txt
Normal file
11
src/vector/freetype/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
target_sources(lottie-player
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/v_ft_math.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/v_ft_raster.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/v_ft_stroker.cpp"
|
||||
)
|
||||
|
||||
target_include_directories(lottie-player
|
||||
PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
Loading…
x
Reference in New Issue
Block a user