Change-Id: I284cc1fc0af6f58e0da16ea8ab3d17de7f3b4286
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)
-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
export LDFLAGS+=" "
-cmake \
- . -DCMAKE_INSTALL_PREFIX=/usr
+cmake . -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_INSTALL_DIR:PATH=%{_libdir}
make %{?jobs:-j%jobs}