lottie: remove hardcoding pathes in pkgconfig file. (.pc) 86/185486/1
authorYoungbok Shin <youngb.shin@samsung.com>
Tue, 31 Jul 2018 05:57:12 +0000 (14:57 +0900)
committerYoungbok Shin <youngb.shin@samsung.com>
Tue, 31 Jul 2018 05:57:12 +0000 (14:57 +0900)
Change-Id: I284cc1fc0af6f58e0da16ea8ab3d17de7f3b4286

CMakeLists.txt
lottie-player.pc.in
packaging/lottie-player.spec

index 6a04e59..453da55 100644 (file)
@@ -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)
 
index b56cc46..f7ea6f0 100644 (file)
@@ -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
index b1e4acd..0f96d78 100644 (file)
@@ -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}