X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=CMakeLists.txt;h=1e9b01d454aaf565cd3acb6f38c14d7969628f56;hb=27a774b0e5cbfa9f60c382f2755ffb3845084bdc;hp=daf3d6bad9a4165aca5c77246543fc816ea3701c;hpb=8aaeff98a3588089ddfacc2d8ad4ae508f20415d;p=platform%2Fcore%2Fuifw%2Flottie-player.git diff --git a/CMakeLists.txt b/CMakeLists.txt index daf3d6b..1e9b01d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 3.2 ) #declare project -project( lottie-player LANGUAGES C CXX ) +project( lottie-player VERSION 0.0.1 LANGUAGES C CXX ASM) #declare target add_library( lottie-player SHARED "" ) @@ -24,7 +24,7 @@ target_compile_options(lottie-player PUBLIC -std=c++14 PRIVATE - -Wall -fvisibility=hidden) + -Wall -fvisibility=hidden -O2) #declare dependancy set( CMAKE_THREAD_PREFER_PTHREAD TRUE ) @@ -35,30 +35,64 @@ target_link_libraries(lottie-player "${CMAKE_THREAD_LIBS_INIT}" ) +target_link_libraries(lottie-player + PUBLIC + "-Wl,--no-undefined" + ) + #declare source and include files add_subdirectory(inc) add_subdirectory(src) +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) +SET(EXEC_DIR ${PREFIX}) +SET(LIBDIR ${LIB_INSTALL_DIR}) +SET(INCDIR ${PREFIX}/include) CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig) +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) #install header -install(FILES inc/lottieplayer.h DESTINATION include) +install(FILES inc/lottieanimation.h inc/lottieanimation_capi.h inc/lottiecommon.h DESTINATION include) #install lib install( TARGETS lottie-player EXPORT lottie-player-targets - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${LIB_INSTALL_DIR} INCLUDES DESTINATION include ) #install config file. + install( EXPORT lottie-player-targets - FILE lottie-player.cmake + FILE lottie-playerTargets.cmake NAMESPACE lottie-player:: - DESTINATION lib/cmake/lottie-player + DESTINATION ${LIB_INSTALL_DIR}/cmake/lottie-player ) +#Create a ConfigVersion.cmake file +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfigVersion.cmake + VERSION ${PROJECT_VERSION} + COMPATIBILITY AnyNewerVersion +) + +configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/lottie-playerConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfig.cmake + INSTALL_DESTINATION ${LIB_INSTALL_DIR}/cmake/lottie-player +) + +#Install the config, configversion and custom find modules +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerConfigVersion.cmake + DESTINATION ${LIB_INSTALL_DIR}/cmake/lottie-player +) + + +export(EXPORT lottie-player-targets FILE ${CMAKE_CURRENT_BINARY_DIR}/lottie-playerTargets.cmake NAMESPACE lottie-player::) + #Register package in user's package registry export(PACKAGE lottie-player) +