-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
34 lines (25 loc) · 1.14 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
cmake_minimum_required(VERSION 2.8)
project(player)
set(VERSION "1.0")
include(FindPkgConfig)
pkg_check_modules(GST REQUIRED gstreamer-1.0)
pkg_check_modules(GSTPB REQUIRED gstreamer-pbutils-1.0)
pkg_check_modules(GLIB REQUIRED glib-2.0)
include_directories(${GST_INCLUDE_DIRS} ${GSTPB_INCLUDE_DIRS} ${GLIB_INCLUDE_DIRS})
link_directories(${GST_LIBRARY_DIRS} ${GSTPB_LIBRARY_DIRS} ${GLIB_LIBRARY_DIRS})
include_directories("${PROJECT_BINARY_DIR}/include/")
add_subdirectory(src)
set(EXTRA_LIBS ${EXTRA_LIBS} player_lib)
add_executable(player player_testsuite.c)
target_link_libraries(player ${EXTRA_LIBS} ${GST_LDFLAGS} ${GSTPB_LDFLAGS} ${GLIB_LDFLAGS})
install(TARGETS player DESTINATION /usr/local/bin/)
include(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_VERSION ${VERSION})
set(CPACK_GENERATOR "RPM")
set(CPACK_PACKAGE_NAME "player")
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_PACKAGE_CONTACT "Ievgenii Baliuk")
set(CPACK_PACKAGE_VENDOR "Baliuk")
set(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")
include(CPack)