mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-01 16:50:33 +00:00
Configure CMake to allow build static rlottie lib
This commit is contained in:
committed by
Subhransu
parent
d07040d498
commit
a1e46310f6
@@ -7,10 +7,14 @@ if (NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE MinSizeRel)
|
||||
endif()
|
||||
|
||||
add_definitions(-DLOT_BUILD)
|
||||
if (NOT DEFINED BUILD_SHARED_LIBS)
|
||||
# Keep the previous behavior of the build system, consistent with Meson.
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
|
||||
#declare target
|
||||
add_library( rlottie SHARED "" )
|
||||
add_library( rlottie )
|
||||
set_target_properties( rlottie PROPERTIES DEFINE_SYMBOL LOT_BUILD )
|
||||
|
||||
#declare version of the target
|
||||
set(player_version_major 0)
|
||||
@@ -64,10 +68,10 @@ target_link_libraries(rlottie
|
||||
"${CMAKE_THREAD_LIBS_INIT}"
|
||||
)
|
||||
|
||||
# for dlopen, dlsym and dlclose dependancy
|
||||
target_link_libraries(rlottie
|
||||
PRIVATE
|
||||
${CMAKE_DL_LIBS})
|
||||
if (LOTTIE_MODULE)
|
||||
# for dlopen, dlsym and dlclose dependancy
|
||||
target_link_libraries(rlottie PRIVATE ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries(rlottie
|
||||
|
||||
@@ -2,6 +2,12 @@ if(LOTTIE_MODULE)
|
||||
add_library(rlottie-image-loader SHARED
|
||||
stb_image.cpp
|
||||
)
|
||||
target_compile_options(rlottie-image-loader PRIVATE
|
||||
-fvisibility=hidden
|
||||
)
|
||||
set_target_properties(rlottie-image-loader PROPERTIES
|
||||
DEFINE_SYMBOL LOT_BUILD
|
||||
)
|
||||
install(TARGETS rlottie-image-loader
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
|
||||
Reference in New Issue
Block a user