Commit 4f912e5a authored by Ghislain MARY's avatar Ghislain MARY

Add CMake option to disable rootca.pem download at build time.

parent e5e90555
...@@ -59,6 +59,7 @@ cmake_dependent_option(ENABLE_ASSISTANT "Turn on assistant compiling." YES "ENAB ...@@ -59,6 +59,7 @@ cmake_dependent_option(ENABLE_ASSISTANT "Turn on assistant compiling." YES "ENAB
option(ENABLE_DEBUG_LOGS "Turn on or off debug level logs." NO) option(ENABLE_DEBUG_LOGS "Turn on or off debug level logs." NO)
option(ENABLE_NLS "Build with internationalisation support" YES) option(ENABLE_NLS "Build with internationalisation support" YES)
option(ENABLE_VCARD "Turn on compilation of vcard4 support." YES) option(ENABLE_VCARD "Turn on compilation of vcard4 support." YES)
option(ENABLE_ROOTCA_DOWNLOAD "Download rootca.pem at build time." YES)
option(CXX_WRAPPER "Build the C++ wrapper for Liblinphone." OFF) option(CXX_WRAPPER "Build the C++ wrapper for Liblinphone." OFF)
......
...@@ -20,25 +20,27 @@ ...@@ -20,25 +20,27 @@
# #
############################################################################ ############################################################################
if(APPLE) if(ENABLE_ROOTCA_DOWNLOAD)
find_program(OPENSSL_PROGRAM openssl) if(APPLE)
execute_process( find_program(OPENSSL_PROGRAM openssl)
COMMAND ${OPENSSL_PROGRAM} version -d execute_process(
OUTPUT_VARIABLE OPENSSL_VERSION COMMAND ${OPENSSL_PROGRAM} version -d
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE OPENSSL_VERSION
) OUTPUT_STRIP_TRAILING_WHITESPACE
string(REGEX REPLACE "OPENSSLDIR: \"(.*)\"" "\\1" HTTPS_CA_DIR "${OPENSSL_VERSION}") )
endif() string(REGEX REPLACE "OPENSSLDIR: \"(.*)\"" "\\1" HTTPS_CA_DIR "${OPENSSL_VERSION}")
endif()
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/rootca.pem PROPERTIES GENERATED TRUE) set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/rootca.pem PROPERTIES GENERATED TRUE)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem
COMMAND ${CMAKE_COMMAND} -DHTTPS_CA_DIR=${HTTPS_CA_DIR} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/rootca.cmake) COMMAND ${CMAKE_COMMAND} -DHTTPS_CA_DIR=${HTTPS_CA_DIR} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/rootca.cmake)
add_custom_target(rootca ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem) add_custom_target(rootca ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem
DESTINATION ${PACKAGE_DATA_DIR}/linphone DESTINATION ${PACKAGE_DATA_DIR}/linphone
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
) )
endif()
set(SOUND_FILES set(SOUND_FILES
hello16000.wav hello16000.wav
......
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