packaging: rename lottie-player to rlottie.

This is a trial-error test that could be accepted by server test.

Change-Id: Ib7ccc4f5d5282df9d119b1efb1de51ffb3cbb0b9
This commit is contained in:
Hermet Park 2019-01-23 20:04:40 +09:00 committed by Hermet Park
parent 660ef0dbd3
commit 9cbbf28d25
15 changed files with 70 additions and 63 deletions

View File

@ -1,26 +1,26 @@
cmake_minimum_required( VERSION 3.2 ) cmake_minimum_required( VERSION 3.2 )
#declare project #declare project
project( lottie-player VERSION 0.0.1 LANGUAGES C CXX ASM) project( rlottie VERSION 0.0.1 LANGUAGES C CXX ASM)
#declare target #declare target
add_library( lottie-player SHARED "" ) add_library( rlottie SHARED "" )
#declare version of the target #declare version of the target
set(player_version_major 0) set(player_version_major 0)
set(player_version_minor 0) set(player_version_minor 0)
set(player_version_patch 1) set(player_version_patch 1)
set(player_version ${player_version_major}.${player_version_minor}.${player_version_patch} ) set(player_version ${player_version_major}.${player_version_minor}.${player_version_patch} )
set_target_properties(lottie-player PROPERTIES set_target_properties(rlottie PROPERTIES
VERSION ${player_version} VERSION ${player_version}
SOVERSION ${player_version_major} SOVERSION ${player_version_major}
) )
#declare alias so that library can be used inside the build tree, e.g. when testing #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) add_library(rlottie::rlottie ALIAS rlottie)
#declare target compilation options #declare target compilation options
target_compile_options(lottie-player target_compile_options(rlottie
PUBLIC PUBLIC
-std=c++14 -std=c++14
PRIVATE PRIVATE
@ -30,17 +30,17 @@ target_compile_options(lottie-player
set( CMAKE_THREAD_PREFER_PTHREAD TRUE ) set( CMAKE_THREAD_PREFER_PTHREAD TRUE )
find_package( Threads ) find_package( Threads )
target_link_libraries(lottie-player target_link_libraries(rlottie
PUBLIC PUBLIC
"${CMAKE_THREAD_LIBS_INIT}" "${CMAKE_THREAD_LIBS_INIT}"
) )
# for dlopen, dlsym and dlclose dependancy # for dlopen, dlsym and dlclose dependancy
target_link_libraries(lottie-player target_link_libraries(rlottie
PRIVATE PRIVATE
${CMAKE_DL_LIBS}) ${CMAKE_DL_LIBS})
target_link_libraries(lottie-player target_link_libraries(rlottie
PUBLIC PUBLIC
"-Wl,--no-undefined" "-Wl,--no-undefined"
) )
@ -53,9 +53,14 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_DIR ${PREFIX}) SET(EXEC_DIR ${PREFIX})
SET(LIBDIR ${LIB_INSTALL_DIR}) SET(LIBDIR ${LIB_INSTALL_DIR})
SET(INCDIR ${PREFIX}/include) SET(INCDIR ${PREFIX}/include)
CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
#temporary for lottie-player dependency.
CONFIGURE_FILE(${PROJECT_NAME}.pc.in lottie-player.pc)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/lottie-player.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
#install header #install header
install(FILES install(FILES
inc/rlottie.h inc/rlottie.h
@ -65,7 +70,7 @@ install(FILES
DESTINATION include) DESTINATION include)
#install lib #install lib
install( TARGETS lottie-player EXPORT lottie-player-targets install( TARGETS rlottie EXPORT rlottie-targets
LIBRARY DESTINATION ${LIB_INSTALL_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR}
ARCHIVE DESTINATION ${LIB_INSTALL_DIR} ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
INCLUDES DESTINATION include INCLUDES DESTINATION include
@ -73,36 +78,36 @@ install( TARGETS lottie-player EXPORT lottie-player-targets
#install config file. #install config file.
install( EXPORT lottie-player-targets install( EXPORT rlottie-targets
FILE lottie-playerTargets.cmake FILE rlottieTargets.cmake
NAMESPACE lottie-player:: NAMESPACE rlottie::
DESTINATION ${LIB_INSTALL_DIR}/cmake/lottie-player DESTINATION ${LIB_INSTALL_DIR}/cmake/rlottie
) )
#Create a ConfigVersion.cmake file #Create a ConfigVersion.cmake file
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
write_basic_package_version_file( write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfigVersion.cmake ${CMAKE_CURRENT_BINARY_DIR}/rlottieConfigVersion.cmake
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion COMPATIBILITY AnyNewerVersion
) )
configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/lottie-playerConfig.cmake.in configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/rlottieConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/rlottieConfig.cmake
INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/lottie-player INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/rlottie
) )
#Install the config, configversion and custom find modules #Install the config, configversion and custom find modules
install(FILES install(FILES
${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/rlottieConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfigVersion.cmake ${CMAKE_CURRENT_BINARY_DIR}/rlottieConfigVersion.cmake
DESTINATION ${LIB_INSTALL_DIR}/cmake/lottie-player DESTINATION ${LIB_INSTALL_DIR}/cmake/rlottie
) )
export(EXPORT lottie-player-targets FILE ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerTargets.cmake NAMESPACE lottie-player::) export(EXPORT rlottie-targets FILE ${CMAKE_CURRENT_BINARY_DIR}/rlottieTargets.cmake NAMESPACE rlottie::)
#Register package in user's package registry #Register package in user's package registry
export(PACKAGE lottie-player) export(PACKAGE rlottie)

View File

@ -1,6 +1,6 @@
Licensing Licensing
lottie-player basically comes with LGPL-v2.1 license(licenses/COPYING.LGPL) rlottie basically comes with LGPL-v2.1 license(licenses/COPYING.LGPL)
but some parts of shared code are covered by different licenses. Listed but some parts of shared code are covered by different licenses. Listed
below are the folder names and the license file covering it. Note that this below are the folder names and the license file covering it. Note that this
license would cover all of the source invovled in each folders, unless license would cover all of the source invovled in each folders, unless

View File

@ -21,7 +21,7 @@ RUN TESTS
BUILD WITH CMAKE BUILD WITH CMAKE
================ ================
liblottie-player can also be built using the cmake build system. librlottie can also be built using the cmake build system.
1. install cmake. (Follow instructions at https://cmake.org/download/) 1. install cmake. (Follow instructions at https://cmake.org/download/)
2. create a new build/ directory 2. create a new build/ directory

View File

@ -1,16 +0,0 @@
get_filename_component(lottie-player_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH ${lottie-player_CMAKE_DIR})
# NOTE Had to use find_package because find_dependency does not support COMPONENTS or MODULE until 3.8.0
#find_dependency(RapidJSON 1.0 REQUIRED MODULE)
#find_package(Boost 1.55 REQUIRED COMPONENTS regex)
list(REMOVE_AT CMAKE_MODULE_PATH -1)
if(NOT TARGET lottie-player::lottie-player)
include("${lottie-player_CMAKE_DIR}/lottie-playerTargets.cmake")
endif()
set(lottie-player_LIBRARIES lottie-player::lottie-player)

View File

@ -0,0 +1,16 @@
get_filename_component(rlottie_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(CMakeFindDependencyMacro)
list(APPEND CMAKE_MODULE_PATH ${rlottie_CMAKE_DIR})
# NOTE Had to use find_package because find_dependency does not support COMPONENTS or MODULE until 3.8.0
#find_dependency(RapidJSON 1.0 REQUIRED MODULE)
#find_package(Boost 1.55 REQUIRED COMPONENTS regex)
list(REMOVE_AT CMAKE_MODULE_PATH -1)
if(NOT TARGET rlottie::rlottie)
include("${rlottie_CMAKE_DIR}/rlottieTargets.cmake")
endif()
set(rlottie_LIBRARIES rlottie::rlottie)

View File

@ -1,4 +1,4 @@
target_include_directories(lottie-player target_include_directories(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}"
) )

View File

@ -1,5 +1,5 @@
Name: lottie-player Name: rlottie
Summary: lottie player library Summary: rlottie ibrary
Version: 0.0.1 Version: 0.0.1
Release: 1 Release: 1
Group: UI Framework/Services Group: UI Framework/Services
@ -54,13 +54,15 @@ make %{?jobs:-j%jobs}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/liblottie-player.so.* %{_libdir}/librlottie.so.*
%manifest %{name}.manifest %manifest %{name}.manifest
%license COPYING licenses/COPYING* %license COPYING licenses/COPYING*
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_includedir}/*.h %{_includedir}/*.h
%{_libdir}/liblottie-player.so %{_libdir}/librlottie.so
%{_libdir}/cmake/lottie-player/*.cmake
%{_libdir}/cmake/rlottie/*.cmake
%{_libdir}/pkgconfig/lottie-player.pc %{_libdir}/pkgconfig/lottie-player.pc
%{_libdir}/pkgconfig/rlottie.pc

View File

@ -4,9 +4,9 @@ apiversion=@player_version@
libdir=@LIBDIR@ libdir=@LIBDIR@
includedir=@INCDIR@ includedir=@INCDIR@
Name: lottie-player Name: rlottie
Description: A lottie-player library Description: A rlottie library
Version: @player_version@ Version: @player_version@
Requires: Requires:
Libs: -L${libdir} -llottie-player Libs: -L${libdir} -lrlottie
Cflags: -I${includedir} -std=c++14 Cflags: -I${includedir} -std=c++14

View File

@ -1,9 +1,9 @@
target_sources(lottie-player target_sources(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/lottieanimation_capi.cpp" "${CMAKE_CURRENT_LIST_DIR}/lottieanimation_capi.cpp"
) )
target_include_directories(lottie-player target_include_directories(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}"
) )

View File

@ -1,5 +1,5 @@
target_sources(lottie-player target_sources(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/lottieitem.cpp" "${CMAKE_CURRENT_LIST_DIR}/lottieitem.cpp"
"${CMAKE_CURRENT_LIST_DIR}/lottieloader.cpp" "${CMAKE_CURRENT_LIST_DIR}/lottieloader.cpp"
@ -8,7 +8,7 @@ target_sources(lottie-player
"${CMAKE_CURRENT_LIST_DIR}/lottieanimation.cpp" "${CMAKE_CURRENT_LIST_DIR}/lottieanimation.cpp"
) )
target_include_directories(lottie-player target_include_directories(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}"
) )

View File

@ -2,7 +2,7 @@
add_subdirectory(freetype) add_subdirectory(freetype)
add_subdirectory(pixman) add_subdirectory(pixman)
target_sources(lottie-player target_sources(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/vrect.cpp" "${CMAKE_CURRENT_LIST_DIR}/vrect.cpp"
"${CMAKE_CURRENT_LIST_DIR}/vdasher.cpp" "${CMAKE_CURRENT_LIST_DIR}/vdasher.cpp"
@ -26,7 +26,7 @@ target_sources(lottie-player
"${CMAKE_CURRENT_LIST_DIR}/vimageloader.cpp" "${CMAKE_CURRENT_LIST_DIR}/vimageloader.cpp"
) )
target_include_directories(lottie-player target_include_directories(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}"
) )

View File

@ -1,11 +1,11 @@
target_sources(lottie-player target_sources(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/v_ft_math.cpp" "${CMAKE_CURRENT_LIST_DIR}/v_ft_math.cpp"
"${CMAKE_CURRENT_LIST_DIR}/v_ft_raster.cpp" "${CMAKE_CURRENT_LIST_DIR}/v_ft_raster.cpp"
"${CMAKE_CURRENT_LIST_DIR}/v_ft_stroker.cpp" "${CMAKE_CURRENT_LIST_DIR}/v_ft_stroker.cpp"
) )
target_include_directories(lottie-player target_include_directories(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}"
) )

View File

@ -1,17 +1,17 @@
target_sources(lottie-player target_sources(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/vregion.cpp" "${CMAKE_CURRENT_LIST_DIR}/vregion.cpp"
) )
IF("${ARCH}" STREQUAL "arm") IF("${ARCH}" STREQUAL "arm")
SET(CMAKE_ASM_FLAGS "${CFLAGS} -x assembler-with-cpp") SET(CMAKE_ASM_FLAGS "${CFLAGS} -x assembler-with-cpp")
target_sources(lottie-player target_sources(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/pixman-arm-neon-asm.S" "${CMAKE_CURRENT_LIST_DIR}/pixman-arm-neon-asm.S"
) )
ENDIF("${ARCH}" STREQUAL "arm") ENDIF("${ARCH}" STREQUAL "arm")
target_include_directories(lottie-player target_include_directories(rlottie
PRIVATE PRIVATE
"${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}"
) )