From: Youngbok Shin Date: Tue, 31 Jul 2018 05:57:12 +0000 (+0900) Subject: lottie: remove hardcoding pathes in pkgconfig file. (.pc) X-Git-Tag: submit/tizen/20180917.042405~154 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F185486%2F1;p=platform%2Fcore%2Fuifw%2Flottie-player.git lottie: remove hardcoding pathes in pkgconfig file. (.pc) Change-Id: I284cc1fc0af6f58e0da16ea8ab3d17de7f3b4286 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a04e59..453da55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,10 @@ target_link_libraries(lottie-player 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) diff --git a/lottie-player.pc.in b/lottie-player.pc.in index b56cc46..f7ea6f0 100644 --- a/lottie-player.pc.in +++ b/lottie-player.pc.in @@ -1,12 +1,12 @@ -prefix=/usr -exec_prefix=/usr -apiversion=0.0.1 -libdir=/usr/lib -includedir=/usr/include +prefix=@PREFIX@ +exec_prefix=@EXEC_DIR@ +apiversion=@player_version@ +libdir=@LIBDIR@ +includedir=@INCDIR@ Name: lottie-player Description: A lottie-player library -Version: @VERSION@ +Version: @player_version@ Requires: Libs: -L${libdir} -llottie-player Cflags: -I${includedir} -std=c++14 diff --git a/packaging/lottie-player.spec b/packaging/lottie-player.spec index b1e4acd..0f96d78 100644 --- a/packaging/lottie-player.spec +++ b/packaging/lottie-player.spec @@ -33,8 +33,8 @@ export CFLAGS+=" -fvisibility=hidden -fPIC -Wall -O2" export LDFLAGS+=" " -cmake \ - . -DCMAKE_INSTALL_PREFIX=/usr +cmake . -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR:PATH=%{_libdir} make %{?jobs:-j%jobs}