mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 03:15:11 +00:00
Add option to build DEB package.
This commit is contained in:
parent
f158466213
commit
d5583c9a6c
2 changed files with 20 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ project(libwebrtc)
|
||||||
|
|
||||||
option(GN_EXTRA_ARGS "Extra 'gn gen' arguments to pass when configuring WebRTC" "")
|
option(GN_EXTRA_ARGS "Extra 'gn gen' arguments to pass when configuring WebRTC" "")
|
||||||
option(NINJA_ARGS "Ninja arguments to pass when compiling WebRTC" "")
|
option(NINJA_ARGS "Ninja arguments to pass when compiling WebRTC" "")
|
||||||
|
option(BUILD_DEB_PACKAGE "Build .deb package" OFF)
|
||||||
|
|
||||||
# Allow the use of IN_LIST operand
|
# Allow the use of IN_LIST operand
|
||||||
cmake_policy(SET CMP0057 NEW)
|
cmake_policy(SET CMP0057 NEW)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
if (BUILD_DEB_PACKAGE)
|
||||||
|
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH INTERNAL FORCE)
|
||||||
|
endif ()
|
||||||
|
|
||||||
# Prepare CMake exports
|
# Prepare CMake exports
|
||||||
configure_file(LibWebRTCConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibWebRTCConfig.cmake @ONLY)
|
configure_file(LibWebRTCConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibWebRTCConfig.cmake @ONLY)
|
||||||
configure_file(LibWebRTCConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibWebRTCConfigVersion.cmake @ONLY)
|
configure_file(LibWebRTCConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibWebRTCConfigVersion.cmake @ONLY)
|
||||||
|
|
@ -81,3 +85,18 @@ else ()
|
||||||
install(FILES LibWebRTCTargets-release.cmake DESTINATION "lib/cmake/LibWebRTC")
|
install(FILES LibWebRTCTargets-release.cmake DESTINATION "lib/cmake/LibWebRTC")
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (BUILD_DEB_PACKAGE)
|
||||||
|
set(CPACK_GENERATOR "DEB")
|
||||||
|
set(CPACK_PACKAGE_NAME "libwebrtc-dev")
|
||||||
|
set(CPACK_PACKAGE_VENDOR "Kirill Kirilenko")
|
||||||
|
set(CPACK_PACKAGE_CONTACT "Kirill Kirilenko <kirill@ultracoder.org>")
|
||||||
|
set(CPACK_PACKAGE_VERSION_MAJOR ${WEBRTC_VERSION})
|
||||||
|
set(CPACK_PACKAGE_VERSION_MINOR "")
|
||||||
|
set(CPACK_PACKAGE_VERSION_PATCH "")
|
||||||
|
set(CPACK_PACKAGE_DESCRIPTION "WebRTC static library and header files")
|
||||||
|
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/UltraCoderRU/libwebrtc")
|
||||||
|
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${WEBRTC_VERSION}")
|
||||||
|
set(CPACK_DEBIAN_PACKAGE_DEPENDS "")
|
||||||
|
include(CPack)
|
||||||
|
endif ()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue