Commit 29ea1e6e authored by François Grisez's avatar François Grisez

CMakeLists.txt: Introduce ENABLE_PACKAGE_SOURCE option

This option makes the creation of 'package_source' custom target optional,
allowing to build with CMake < 3.11 if it is disabled (default).
parent 5a21a383
Pipeline #10957 passed with stages
in 38 minutes and 11 seconds
......@@ -48,6 +48,7 @@ option(ENABLE_MDNS "Build multicast DNS support" NO)
option(ENABLE_EXTERNAL_AUTH_PLUGIN "Enable ExternalAuth plugin support" NO)
option(ENABLE_JWE_AUTH_PLUGIN "Enable JweAuth plugin support" NO)
option(ENABLE_UNIT_TESTS "Enable flexisip unit tests (low level tests)" ON)
option(ENABLE_PACKAGE_SOURCE "Create 'package_source' target for source archive making (CMake >= 3.11)" OFF)
cmake_dependent_option(ENABLE_SPECIFIC_FEATURES "Enable mediarelay specific features" OFF "ENABLE_TRANSCODER" OFF)
......@@ -225,4 +226,6 @@ if(ENABLE_UNIT_TESTS)
endif()
# Packaging
add_subdirectory(build)
if (ENABLE_PACKAGE_SOURCE)
add_subdirectory(build)
endif()
......@@ -20,6 +20,8 @@
#
############################################################################
cmake_minimum_required(VERSION 3.11) # we need CMake 3.11 for defining 'package_source' target as custom target
if (NOT CPACK_PACKAGE_NAME)
set(CPACK_PACKAGE_NAME "flexisip")
endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment