mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Revert back to add signing identity for Macos.
Allow CPACK to sign the application. Fix cmake options list that wasn't set because of scope. Make more generic the Windows hack on QtKeyChain. Use a script to code sign all files (not working in cmake file) Clean cmake files to use targets. Rework Mac build. Avoid to use git if version has been specified with cmake command (LINPHONEAPP_VERSION)
This commit is contained in:
parent
6a492b9f05
commit
aac2d9f120
22 changed files with 382 additions and 616 deletions
|
|
@ -18,7 +18,7 @@
|
|||
echo $DEFAULT_MACOS_CMAKE_OPTIONS
|
||||
echo $CMAKE_OPTIONS
|
||||
echo $ADDITIONAL_BUILD_OPTIONS
|
||||
cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Macos -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE $DEFAULT_MACOS_CMAKE_OPTIONS $XCODE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE $RELEASE_FILE
|
||||
cmake .. -G "$CMAKE_GENERATOR" -DLINPHONESDK_PLATFORM=Macos -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 -DCMAKE_BUILD_TYPE=$CI_BUILD_TYPE $DEFAULT_MACOS_CMAKE_OPTIONS -DLINPHONE_BUILDER_SIGNING_IDENTITY=$MACOS_SIGNING_IDENTITY $XCODE_OPTIONS $CMAKE_OPTIONS $SCHEDULE_CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE $RELEASE_FILE
|
||||
cmake --build . --target install --config $CI_BUILD_TYPE $LBC_NODEBUG_OPTIONS -- $ADDITIONAL_BUILD_OPTIONS
|
||||
ccache -s
|
||||
|
||||
|
|
|
|||
159
CMakeLists.txt
159
CMakeLists.txt
|
|
@ -40,8 +40,8 @@ if(ENABLE_BUILD_VERBOSE)
|
|||
message("User Args : ${USER_ARGS}")
|
||||
endif()
|
||||
if( APPLE )
|
||||
set(LINPHONESDK_BUILD_TYPE "Macos")
|
||||
set(ENABLE_FAT_BINARY "ON")
|
||||
set(LINPHONESDK_BUILD_TYPE "Default")#Using Mac will remove all SDK targets.
|
||||
set(ENABLE_FAT_BINARY "ON") # Disable XCFrameworks as it is not supported.
|
||||
if( NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version")
|
||||
endif()
|
||||
|
|
@ -58,7 +58,6 @@ endif()
|
|||
|
||||
project(linphoneqt)
|
||||
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||
include(GNUInstallDirs)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
|
|
@ -73,7 +72,7 @@ set(CMAKE_INSTALL_PREFIX "${APPLICATION_OUTPUT_DIR}")
|
|||
#set(LINPHONE__DIR "${CMAKE_BINARY_DIR}/linphone-sdk/linphone-sdk/mac")
|
||||
set(QTKEYCHAIN_OUTPUT_DIR "${APPLICATION_OUTPUT_DIR}")
|
||||
|
||||
set(QTKEYCHAIN_TARGET_NAME "EQt5Keychain")
|
||||
|
||||
|
||||
# Avoid cmake warning if CMP0071 is not set.
|
||||
if (POLICY CMP0071)
|
||||
|
|
@ -102,57 +101,67 @@ endif()
|
|||
#-------------------------------------------------------------------------------
|
||||
# SET OPTIONS
|
||||
#-------------------------------------------------------------------------------
|
||||
set(OPTION_LIST)
|
||||
function(add_option OPTION DESC VALUE)
|
||||
option(${OPTION} ${DESC} ${VALUE})
|
||||
list(APPEND OPTION_LIST "-D${OPTION}=${VALUE}")
|
||||
set(OPTION_LIST "")
|
||||
#function doesn't work with strings value
|
||||
function(add_option _OPTION_LIST OPTION DESC VALUE)
|
||||
option(${OPTION} ${DESC} ${VALUE})
|
||||
list(APPEND _OPTION_LIST ${${_OPTION_LIST}} "-D${OPTION}=${VALUE}")
|
||||
set(${${_OPTION_LIST}} ${_OPTION_LIST} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(add_cache _OPTION_LIST OPTION DESC VALUE)
|
||||
set(${OPTION} ${VALUE} CACHE STRING ${DESC})
|
||||
list(APPEND _OPTION_LIST ${${_OPTION_LIST}} "-D${OPTION}=${VALUE}")
|
||||
set(${${_OPTION_LIST}} ${_OPTION_LIST} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
#option(ENABLE_APP_LICENSE "Enable the license in packages." ON)
|
||||
add_option(ENABLE_APP_LICENSE "Enable the license in packages." ON)
|
||||
add_option(ENABLE_APP_OAUTH2 "Build with OAuth2 support for remote provisioning." OFF) # Experimental.
|
||||
add_option(ENABLE_APP_PACKAGING "Enable packaging" OFF)
|
||||
add_option(ENABLE_APP_PACKAGE_ROOTCA "Embed the rootca file into the package" ON)
|
||||
add_option(ENABLE_APP_PDF_VIEWER "Enable Pdf viewer" ON)
|
||||
add_option(ENABLE_APP_WEBVIEW "Enable webviews." OFF) # Webview is not fully supported because of deployments. Used for subscription.
|
||||
add_option(ENABLE_BUILD_APP_PLUGINS "Enable the build of plugins" ON)
|
||||
add_option(ENABLE_BUILD_EXAMPLES "Enable the build of examples" OFF)
|
||||
add_option(ENABLE_BUILD_VERBOSE "Enable the build generation to be more verbose" OFF)
|
||||
add_option(ENABLE_CONSOLE_UI "Turn on or off compilation of console interface." OFF)
|
||||
add_option(ENABLE_DAEMON "Enable the linphone daemon interface." OFF)
|
||||
add_option(ENABLE_DOC "Enable API documentation generation." OFF)
|
||||
add_option(ENABLE_FFMPEG "Build mediastreamer2 with ffmpeg video support." OFF)# No more needed
|
||||
add_option(ENABLE_LDAP "Enable LDAP support." YES)
|
||||
add_option(ENABLE_NON_FREE_CODECS "Enable the use of non free codecs" YES)
|
||||
add_option(ENABLE_NON_FREE_FEATURES "Enable the use of non free codecs" ${ENABLE_NON_FREE_CODECS})
|
||||
add_option(ENABLE_OPENH264 "Enable the use of OpenH264 codec" YES)
|
||||
add_option(ENABLE_QT_KEYCHAIN "Build QtKeychain to manage VFS from System key stores." ON)
|
||||
add_option(ENABLE_QRCODE "Enable QRCode support" OFF)#Experimental
|
||||
add_option(ENABLE_RELATIVE_PREFIX "Set Internal packages relative to the binary" ON)
|
||||
add_option(ENABLE_SANITIZER "Enable sanitizer." OFF)
|
||||
add_option(ENABLE_STRICT "Build with strict compilator flags e.g. -Wall -Werror" OFF)
|
||||
add_option(ENABLE_TESTS "Build with testing binaries of SDK" OFF)
|
||||
add_option(ENABLE_TESTS_COMPONENTS "Build libbctoolbox-tester" OFF)
|
||||
add_option(ENABLE_TOOLS "Enable tools of SDK" OFF)
|
||||
add_option(ENABLE_UNIT_TESTS "Enable unit test of SDK." OFF)
|
||||
add_option(ENABLE_UPDATE_CHECK "Enable update check." ON)
|
||||
add_option(ENABLE_VIDEO "Enable Video support." YES)
|
||||
add_option(ENABLE_WINDOWS_TOOLS_CHECK "Enable tools checks on Windows for auto install." OFF)
|
||||
add_option(OPTION_LIST ENABLE_APP_LICENSE "Enable the license in packages." ON)
|
||||
add_option(OPTION_LIST ENABLE_APP_OAUTH2 "Build with OAuth2 support for remote provisioning." OFF) # Experimental.
|
||||
add_option(OPTION_LIST ENABLE_APP_PACKAGING "Enable packaging" OFF)
|
||||
add_option(OPTION_LIST ENABLE_APP_PACKAGE_ROOTCA "Embed the rootca file into the package" ON)
|
||||
add_option(OPTION_LIST ENABLE_APP_PDF_VIEWER "Enable Pdf viewer" ON)
|
||||
add_option(OPTION_LIST ENABLE_APP_WEBVIEW "Enable webviews." OFF) # Webview is not fully supported because of deployments. Used for subscription.
|
||||
add_option(OPTION_LIST ENABLE_BUILD_APP_PLUGINS "Enable the build of plugins" ON)
|
||||
add_option(OPTION_LIST ENABLE_BUILD_EXAMPLES "Enable the build of examples" OFF)
|
||||
add_option(OPTION_LIST ENABLE_BUILD_VERBOSE "Enable the build generation to be more verbose" OFF)
|
||||
add_option(OPTION_LIST ENABLE_CONSOLE_UI "Turn on or off compilation of console interface." OFF)
|
||||
add_option(OPTION_LIST ENABLE_DAEMON "Enable the linphone daemon interface." OFF)
|
||||
add_option(OPTION_LIST ENABLE_DOC "Enable API documentation generation." OFF)
|
||||
add_option(OPTION_LIST ENABLE_FFMPEG "Build mediastreamer2 with ffmpeg video support." OFF)# No more needed
|
||||
add_option(OPTION_LIST ENABLE_LDAP "Enable LDAP support." YES)
|
||||
add_option(OPTION_LIST ENABLE_NON_FREE_CODECS "Enable the use of non free codecs" YES)
|
||||
add_option(OPTION_LIST ENABLE_NON_FREE_FEATURES "Enable the use of non free codecs" ${ENABLE_NON_FREE_CODECS})
|
||||
add_option(OPTION_LIST ENABLE_OPENH264 "Enable the use of OpenH264 codec" YES)
|
||||
add_option(OPTION_LIST ENABLE_QT_KEYCHAIN "Build QtKeychain to manage VFS from System key stores." ON)
|
||||
add_option(OPTION_LIST ENABLE_QRCODE "Enable QRCode support" OFF)#Experimental
|
||||
add_option(OPTION_LIST ENABLE_RELATIVE_PREFIX "Set Internal packages relative to the binary" ON)
|
||||
add_option(OPTION_LIST ENABLE_SANITIZER "Enable sanitizer." OFF)
|
||||
add_option(OPTION_LIST ENABLE_STRICT "Build with strict compilator flags e.g. -Wall -Werror" OFF)
|
||||
add_option(OPTION_LIST ENABLE_TESTS "Build with testing binaries of SDK" OFF)
|
||||
add_option(OPTION_LIST ENABLE_TESTS_COMPONENTS "Build libbctoolbox-tester" OFF)
|
||||
add_option(OPTION_LIST ENABLE_TOOLS "Enable tools of SDK" OFF)
|
||||
add_option(OPTION_LIST ENABLE_UNIT_TESTS "Enable unit test of SDK." OFF)
|
||||
add_option(OPTION_LIST ENABLE_UPDATE_CHECK "Enable update check." ON)
|
||||
add_option(OPTION_LIST ENABLE_VIDEO "Enable Video support." YES)
|
||||
add_option(OPTION_LIST ENABLE_WINDOWS_TOOLS_CHECK "Enable tools checks on Windows for auto install." OFF)
|
||||
|
||||
|
||||
add_option(LINPHONE_SDK_MAKE_RELEASE_FILE_URL "Make a RELEASE file that work along check_version and use this URL" "")
|
||||
add_option(OPTION_LIST LINPHONE_SDK_MAKE_RELEASE_FILE_URL "Make a RELEASE file that work along check_version and use this URL" "")
|
||||
|
||||
# QtKeychain
|
||||
add_option(LIBSECRET_SUPPORT "Build with libsecret support" OFF) # Need libsecret-devel
|
||||
|
||||
add_option(OPTION_LIST LIBSECRET_SUPPORT "Build with libsecret support" OFF) # Need libsecret-devel
|
||||
if(WIN32)
|
||||
option(ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" YES)
|
||||
elseif(APPLE)
|
||||
option(ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" OFF)
|
||||
add_cache(OPTION_LIST QTKEYCHAIN_TARGET_NAME "Override Qt5Keychain library name for a workaround with windeployqt" "EQt5Keychain")
|
||||
else()
|
||||
option(ENABLE_V4L "Ability to capture and display video using libv4l2 or libv4l." YES)
|
||||
option(ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" OFF)
|
||||
add_cache(OPTION_LIST QTKEYCHAIN_TARGET_NAME "Override Qt5Keychain library name" "Qt5Keychain")
|
||||
endif()
|
||||
if(WIN32)
|
||||
add_option(OPTION_LIST ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" YES)
|
||||
elseif(APPLE)
|
||||
add_option(OPTION_LIST ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" OFF)
|
||||
else()
|
||||
add_option(OPTION_LIST ENABLE_V4L "Ability to capture and display video using libv4l2 or libv4l." YES)
|
||||
add_option(OPTION_LIST ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" OFF)
|
||||
endif()
|
||||
|
||||
# Set some SDK variables to configure the APP build as we want it
|
||||
|
|
@ -160,10 +169,10 @@ set(ENABLE_CXX_WRAPPER ON CACHE BOOL "Build the C++ wrapper for Liblinphone." FO
|
|||
set(ENABLE_THEORA OFF)
|
||||
set(ENABLE_QT_GL ${ENABLE_VIDEO})
|
||||
|
||||
find_package(Qt5 5.10 COMPONENTS Core REQUIRED)
|
||||
find_package(Qt5 5.12 COMPONENTS Core REQUIRED)
|
||||
|
||||
if(NOT Qt5_FOUND)
|
||||
message(FATAL_ERROR "Minimum supported Qt5 version is 5.10!")
|
||||
message(FATAL_ERROR "Minimum supported Qt5 version is 5.12!")
|
||||
endif()
|
||||
|
||||
set(LINPHONEAPP_BUILD_TYPE "Default" CACHE STRING "Type of build")
|
||||
|
|
@ -178,39 +187,35 @@ if(LINPHONEAPP_BUILD_TYPE STREQUAL "Default")
|
|||
|
||||
endif()
|
||||
|
||||
if(NOT LINPHONE_QT_ONLY)
|
||||
function(add_linphone_sdk)
|
||||
set(CMAKE_INSTALL_PREFIX "${APPLICATION_OUTPUT_DIR}")
|
||||
#set(CMAKE_BINARY_DIR ${APPLICATION_OUTPUT_DIR})
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # Prevent project from overriding the options we just set here
|
||||
add_subdirectory("linphone-sdk")
|
||||
endfunction()
|
||||
add_linphone_sdk()
|
||||
if(NOT APPLE OR MONO_ARCH)
|
||||
add_custom_target(linphone-deps)
|
||||
if(NOT LINPHONE_QT_ONLY)
|
||||
function(add_linphone_sdk)
|
||||
set(CMAKE_INSTALL_PREFIX "${APPLICATION_OUTPUT_DIR}")
|
||||
#set(CMAKE_BINARY_DIR ${APPLICATION_OUTPUT_DIR})
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # Prevent project from overriding the options we just set here
|
||||
add_subdirectory("linphone-sdk")
|
||||
endfunction()
|
||||
add_linphone_sdk()
|
||||
|
||||
if(ENABLE_QT_KEYCHAIN)
|
||||
function(add_linphone_keychain)
|
||||
set(CMAKE_INSTALL_PREFIX "${QTKEYCHAIN_OUTPUT_DIR}")
|
||||
add_subdirectory("external/qtkeychain")
|
||||
endfunction()
|
||||
add_linphone_keychain()
|
||||
endif()
|
||||
get_target_property(LINPHONE_BIN_DIR sdk LOCATION)
|
||||
endif()
|
||||
if(ENABLE_QT_KEYCHAIN)
|
||||
function(add_linphone_keychain)
|
||||
set(CMAKE_INSTALL_PREFIX "${QTKEYCHAIN_OUTPUT_DIR}")
|
||||
add_subdirectory("external/qtkeychain")
|
||||
endfunction()
|
||||
add_linphone_keychain()
|
||||
endif()
|
||||
get_target_property(LINPHONE_BIN_DIR sdk LOCATION)
|
||||
endif()
|
||||
|
||||
if(NOT LINPHONE_OUTPUT_DIR AND NOT LINPHONE_BIN_DIR)
|
||||
set(LINPHONE_OUTPUT_DIR ${APPLICATION_OUTPUT_DIR})
|
||||
else()
|
||||
set(LINPHONE_OUTPUT_DIR ${LINPHONE_BIN_DIR})
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT APPLE)
|
||||
if(NOT LINPHONE_OUTPUT_DIR AND NOT LINPHONE_BIN_DIR)
|
||||
set(LINPHONE_OUTPUT_DIR ${APPLICATION_OUTPUT_DIR})
|
||||
else()
|
||||
set(LINPHONE_OUTPUT_DIR ${LINPHONE_BIN_DIR})
|
||||
endif()
|
||||
function(add_linphone_app)
|
||||
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # Prevent project from overriding the options we just set here
|
||||
if(APPLE)
|
||||
add_compile_definitions("ENABLE_FAT_BINARY=ON") # Disable XCFrameworks as it is not supported.
|
||||
elseif(UNIX)
|
||||
if(UNIX)
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN:$ORIGIN/lib64:$ORIGIN/../lib64:$ORIGIN/lib:$ORIGIN/../lib")
|
||||
endif()
|
||||
add_subdirectory("linphone-app")
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ execute_process(
|
|||
# Copy and merge content of all architectures in the desktop directory
|
||||
list(GET _MACOS_ARCHS 0 _FIRST_ARCH)
|
||||
execute_process(# Do not use copy_directory because of symlinks
|
||||
COMMAND "cp" "-R" "${LINPHONEAPP_NAME}/${LINPHONEAPP_PLATFORM}-${_FIRST_ARCH}/" "${CMAKE_INSTALL_PREFIX}"
|
||||
COMMAND "cp" "-R" "${LINPHONEAPP_NAME}-${_FIRST_ARCH}/OUTPUT/" "${CMAKE_INSTALL_PREFIX}"
|
||||
WORKING_DIRECTORY "${LINPHONEAPP_BUILD_DIR}"
|
||||
)
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ execute_process(# Do not use copy_directory because of symlinks
|
|||
|
||||
##### MIX
|
||||
# Get all files in output
|
||||
file(GLOB_RECURSE _BINARIES RELATIVE "${LINPHONEAPP_BUILD_DIR}/${LINPHONEAPP_NAME}/${LINPHONEAPP_PLATFORM}-${_FIRST_ARCH}/" "${LINPHONEAPP_BUILD_DIR}/${LINPHONEAPP_NAME}/${LINPHONEAPP_PLATFORM}-${_FIRST_ARCH}/*")
|
||||
file(GLOB_RECURSE _BINARIES RELATIVE "${LINPHONEAPP_BUILD_DIR}/${LINPHONEAPP_NAME}-${_FIRST_ARCH}/OUTPUT/" "${LINPHONEAPP_BUILD_DIR}/${LINPHONEAPP_NAME}-${_FIRST_ARCH}/OUTPUT/*")
|
||||
|
||||
if(NOT ENABLE_FAT_BINARY)
|
||||
# Remove all .framework inputs from the result
|
||||
|
|
@ -56,10 +56,10 @@ if(NOT ENABLE_FAT_BINARY)
|
|||
endif()
|
||||
|
||||
foreach(_FILE IN LISTS ${_BINARIES})
|
||||
get_filename_component(ABSOLUTE_FILE "${LINPHONEAPP_NAME}/${LINPHONEAPP_PLATFORM}-${_FIRST_ARCH}/${_FILE}" ABSOLUTE)
|
||||
get_filename_component(ABSOLUTE_FILE "${LINPHONEAPP_NAME}-${_FIRST_ARCH}/OUTPUT/${_FILE}" ABSOLUTE)
|
||||
if(NOT IS_SYMLINK ${ABSOLUTE_FILE})
|
||||
# Check if lipo can detect an architecture
|
||||
execute_process(COMMAND lipo -archs "${LINPHONEAPP_NAME}/${LINPHONEAPP_PLATFORM}-${_FIRST_ARCH}/${_FILE}"
|
||||
execute_process(COMMAND lipo -archs "${LINPHONEAPP_NAME}-${_FIRST_ARCH}/OUTPUT/${_FILE}"
|
||||
OUTPUT_VARIABLE FILE_ARCHITECTURE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY "${LINPHONEAPP_BUILD_DIR}"
|
||||
|
|
@ -69,7 +69,7 @@ foreach(_FILE IN LISTS ${_BINARIES})
|
|||
# There is at least one architecture : Use this candidate to mix with another architecture
|
||||
set(_ALL_ARCH_FILES)
|
||||
foreach(_ARCH IN LISTS ${_ARCHS})
|
||||
list(APPEND _ALL_ARCH_FILES "${LINPHONEAPP_NAME}/${LINPHONEAPP_PLATFORM}-${_ARCH}/${_FILE}")
|
||||
list(APPEND _ALL_ARCH_FILES "${LINPHONEAPP_NAME}-${_ARCH}/OUTPUT/${_FILE}")
|
||||
endforeach()
|
||||
string(REPLACE ";" " " _ARCH_STRING "${_ARCHS}")
|
||||
message(STATUS "Mixing ${_FILE} for archs [${_ARCH_STRING}]")
|
||||
|
|
@ -83,7 +83,7 @@ endforeach()
|
|||
#[[
|
||||
if(NOT ENABLE_FAT_BINARY)
|
||||
# Generate XCFrameworks
|
||||
file(GLOB _FRAMEWORKS "${LINPHONEAPP_BUILD_DIR}/${LINPHONEAPP_NAME}/${LINPHONEAPP_PLATFORM}-${_FIRST_ARCH}/Frameworks/*.framework")
|
||||
file(GLOB _FRAMEWORKS "${LINPHONEAPP_BUILD_DIR}/${LINPHONEAPP_NAME}-${_FIRST_ARCH}/OUTPUT/Frameworks/*.framework")
|
||||
foreach(_FRAMEWORK IN LISTS _FRAMEWORKS)
|
||||
get_filename_component(_FRAMEWORK_NAME "${_FRAMEWORK}" NAME_WE)
|
||||
set(_ALL_ARCH_FRAMEWORKS)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ set(_MACOS_ARCHS ${LINPHONEAPP_MACOS_ARCHS})
|
|||
|
||||
set(LINPHONEAPP_NAME "linphone-app")
|
||||
set(LINPHONEAPP_PLATFORM "macos")
|
||||
set(SUB_TARGET app_macos)
|
||||
string(TOLOWER "${LINPHONEAPP_PLATFORM}" LINPHONEAPP_PLATFORM_LOWER)
|
||||
set(_MACOS_INSTALL_RELATIVE_DIR "${LINPHONEAPP_NAME}/${LINPHONEAPP_PLATFORM_LOWER}")
|
||||
set(_MACOS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${_MACOS_INSTALL_RELATIVE_DIR}")
|
||||
|
|
@ -36,19 +37,20 @@ set(_MACOS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${_MACOS_INSTALL_RELATIVE_DIR}")
|
|||
# Build each selected architecture
|
||||
############################################################################
|
||||
|
||||
#linphone_sdk_get_inherited_cmake_args(_CMAKE_CONFIGURE_ARGS _CMAKE_BUILD_ARGS)
|
||||
#linphone_sdk_get_enable_cmake_args(_MACOS_CMAKE_ARGS)
|
||||
|
||||
set(_MACOS_TARGETS)
|
||||
foreach(_MACOS_ARCH IN LISTS _MACOS_ARCHS)
|
||||
set(_TARGET_NAME app_macos-${_MACOS_ARCH})
|
||||
set(_TARGET_NAME ${SUB_TARGET}-${_MACOS_ARCH})
|
||||
set(_MACOS_ARCH_BINARY_DIR "${PROJECT_BINARY_DIR}/${_TARGET_NAME}")
|
||||
#set(_MACOS_ARCH_INSTALL_DIR "${PROJECT_BINARY_DIR}/${LINPHONEAPP_NAME}/mac-${_MACOS_ARCH}")
|
||||
set(_MACOS_ARCH_INSTALL_DIR "${_MACOS_INSTALL_DIR}-${_MACOS_ARCH}")
|
||||
|
||||
add_custom_target(${_TARGET_NAME} ALL
|
||||
COMMAND ${CMAKE_COMMAND} -B ${_MACOS_ARCH_BINARY_DIR} ${USER_ARGS} ${OPTION_LIST} -DCMAKE_INSTALL_PREFIX=${_MACOS_ARCH_INSTALL_DIR} -DLINPHONE_OUTPUT_DIR=${LINPHONE_OUTPUT_DIR} -DCMAKE_TOOLCHAIN_FILE=${PROJECT_SOURCE_DIR}/cmake/toolchains/toolchain-mac-x86_64.cmake -DLINPHONEAPP_BUILD_TYPE="Normal"
|
||||
COMMAND ${CMAKE_COMMAND} -B ${_MACOS_ARCH_BINARY_DIR} -DMONO_ARCH=${_MACOS_ARCH} ${USER_ARGS} ${OPTION_LIST} ${_MACOS_CMAKE_ARGS} -DCMAKE_INSTALL_PREFIX=${_MACOS_ARCH_INSTALL_DIR} -DLINPHONE_OUTPUT_DIR=${LINPHONE_OUTPUT_DIR} -DQTKEYCHAIN_OUTPUT_DIR="${QTKEYCHAIN_OUTPUT_DIR}" -DCMAKE_TOOLCHAIN_FILE=${PROJECT_SOURCE_DIR}/cmake/toolchains/toolchain-mac-x86_64.cmake -DLINPHONEAPP_BUILD_TYPE="Normal"
|
||||
COMMAND ${CMAKE_COMMAND} --build ${_MACOS_ARCH_BINARY_DIR} --target install ${_CMAKE_BUILD_ARGS}
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/linphone-app
|
||||
DEPENDS sdk
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMENT "Building Linphone APP for MacOS ${_MACOS_ARCH}"
|
||||
USES_TERMINAL
|
||||
COMMAND_EXPAND_LISTS
|
||||
|
|
@ -60,14 +62,15 @@ endforeach()
|
|||
############################################################################
|
||||
# Generate the aggregated apps
|
||||
############################################################################
|
||||
#message(FATAL_ERROR "${CMAKE_BINARY_DIR} / ${_MACOS_INSTALL_DIR} / ${LINPHONEAPP_MACOS_ARCHS} / ${LINPHONEAPP_NAME} / ${_MACOS_ARCH_BINARY_DIR} / ${_MACOS_ARCH_INSTALL_DIR} / ${CMAKE_INSTALL_PREFIX}")
|
||||
add_custom_target(gen-apps ALL
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
"-DLINPHONESDK_DIR=${PROJECT_SOURCE_DIR}/linphone-sdk"
|
||||
"-DLINPHONEAPP_BUILD_DIR=${CMAKE_INSTALL_PREFIX}"
|
||||
"-DLINPHONEAPP_BUILD_DIR=${CMAKE_BINARY_DIR}"
|
||||
"-DLINPHONEAPP_MACOS_ARCHS=${LINPHONEAPP_MACOS_ARCHS}"
|
||||
"-DLINPHONEAPP_NAME=${LINPHONEAPP_NAME}"
|
||||
"-DLINPHONEAPP_NAME=${SUB_TARGET}"
|
||||
"-DLINPHONEAPP_PLATFORM=${LINPHONEAPP_PLATFORM_LOWER}"
|
||||
"-DCMAKE_INSTALL_PREFIX=${_MACOS_INSTALL_DIR}"
|
||||
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
|
||||
"-DENABLE_FAT_BINARY=${ENABLE_FAT_BINARY}"
|
||||
"-P" "${PROJECT_SOURCE_DIR}/cmake/GenerateAppMacos.cmake"
|
||||
DEPENDS ${_MACOS_TARGETS}
|
||||
|
|
@ -76,5 +79,5 @@ add_custom_target(gen-apps ALL
|
|||
USES_TERMINAL
|
||||
)
|
||||
|
||||
|
||||
install(CODE "message(\"Dummy install target\")")
|
||||
|
||||
|
|
|
|||
|
|
@ -22,24 +22,29 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
|
||||
#Linphone targets
|
||||
set(LINPHONE_PACKAGES LibLinphoneCxx Mediastreamer2 Belcard LibLinphone)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
set(LINPHONE_TARGETS)
|
||||
|
||||
find_package(BCToolbox)
|
||||
if(NOT BCToolbox_FOUND)
|
||||
find_package(bctoolbox CONFIG)
|
||||
find_package(bctoolbox CONFIG REQUIRED)
|
||||
endif()
|
||||
set(FULL_VERSION )
|
||||
bc_compute_full_version(FULL_VERSION)
|
||||
set(version_major )
|
||||
set(version_minor )
|
||||
set(version_patch )
|
||||
if(NOT LINPHONEAPP_VERSION)
|
||||
bc_compute_full_version(LINPHONEAPP_VERSION)
|
||||
endif()
|
||||
set(version_major)
|
||||
set(version_minor)
|
||||
set(version_patch)
|
||||
set(identifiers )
|
||||
set(metadata )
|
||||
bc_parse_full_version("${FULL_VERSION}" version_major version_minor version_patch identifiers metadata)
|
||||
bc_parse_full_version("${LINPHONEAPP_VERSION}" version_major version_minor version_patch identifiers metadata)
|
||||
|
||||
|
||||
project(linphoneqt VERSION "${version_major}.${version_minor}.${version_patch}")
|
||||
|
||||
|
||||
if(ENABLE_BUILD_VERBOSE)
|
||||
#message("CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH}")
|
||||
message("Options : ${ENABLE_UPDATE_CHECK}, ${ENABLE_UNIT_TESTS}, ${ENABLE_TESTS}, ${ENABLE_TESTS_COMPONENTS}, ${ENABLE_TOOLS}, ${ENABLE_STRICT}, ${ENABLE_FFMPEG}, ${ENABLE_OPUS}")
|
||||
|
|
@ -61,9 +66,9 @@ list(APPEND CMAKE_MODULE_PATH "${LINPHONE_OUTPUT_DIR}/cmake")
|
|||
list(APPEND CMAKE_MODULE_PATH "${LINPHONE_OUTPUT_DIR}/lib64/cmake")
|
||||
list(APPEND CMAKE_MODULE_PATH "${LINPHONE_OUTPUT_DIR}/lib/cmake")
|
||||
|
||||
list(APPEND CMAKE_PREFIX_PATH "${QTKEYCHAIN_OUTPUT_DIR}/lib64/cmake")
|
||||
list(APPEND CMAKE_PREFIX_PATH "${QTKEYCHAIN_OUTPUT_DIR}/lib/cmake")
|
||||
|
||||
|
||||
if(APPLE)
|
||||
list(APPEND CMAKE_FRAMEWORK_PATH "${LINPHONE_OUTPUT_DIR}/Frameworks")
|
||||
endif()
|
||||
|
|
@ -77,7 +82,7 @@ if(NOT APPLICATION_START_LICENCE OR "${CURRENT_YEAR}" STREQUAL "${APPLICATION_S
|
|||
else()
|
||||
set(COPYRIGHT_RANGE_DATE "${APPLICATION_START_LICENCE}-${CURRENT_YEAR}")
|
||||
endif()
|
||||
set(APPLICATION_SEMVER ${FULL_VERSION})
|
||||
set(APPLICATION_SEMVER ${LINPHONEAPP_VERSION})
|
||||
if(WIN32)
|
||||
set(EXECUTABLE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_DIR} )
|
||||
|
|
@ -90,26 +95,30 @@ if(WIN32)
|
|||
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${EXECUTABLE_OUTPUT_DIR} )
|
||||
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )
|
||||
endif()
|
||||
if(TARGET sdk)#if not exist, this build is coming from crosscompiling (aka already dependent of sdk)
|
||||
list(APPEND LINPHONE_TARGETS sdk)
|
||||
set(LINPHONE_PACKAGES Belr Belcard Ortp Mediastreamer2 BelleSIP Linphone LinphoneCxx)
|
||||
endif()
|
||||
|
||||
set(ENABLE_ADVANCED_IM ON CACHE BOOLEAN "Enable IM")
|
||||
set(ENABLE_DB_STORAGE ON CACHE BOOLEAN "Enable Storage")
|
||||
|
||||
if(ENABLE_ADVANCED_IM OR ENABLE_DB_STORAGE OR ENABLE_PQCRYPTO)
|
||||
list(PREPEND LINPHONE_PACKAGES Lime)
|
||||
endif()
|
||||
####################################
|
||||
# LINPHONE TARGETS
|
||||
####################################
|
||||
|
||||
foreach(PACKAGE ${LINPHONE_PACKAGES})
|
||||
message(STATUS "Trying to find ${PACKAGE}")
|
||||
find_package(${PACKAGE})
|
||||
if(NOT ${PACKAGE}_FOUND)
|
||||
find_package(${PACKAGE} CONFIG)
|
||||
find_package(${PACKAGE} CONFIG REQUIRED)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(PLUGIN_TARGETS ${LibLinphoneCxx_TARGET})
|
||||
set(APP_TARGETS ${LibLinphoneCxx_TARGET}
|
||||
${BCToolbox_TARGET}#Logger/App
|
||||
${Mediastreamer2_TARGET}#MediastreamerUtils
|
||||
${Belcard_TARGET}#VCard Model
|
||||
${LibLinphone_TARGET})#MediastreamerUtils
|
||||
|
||||
####################################
|
||||
|
||||
if(ENABLE_QT_KEYCHAIN)
|
||||
find_package(QtKeychain)
|
||||
|
|
@ -179,36 +188,50 @@ endif()
|
|||
if(ENABLE_VIDEO)
|
||||
add_definitions(-DENABLE_VIDEO)
|
||||
endif()
|
||||
|
||||
if( ENABLE_QT_KEYCHAIN)
|
||||
if(NOT QTKEYCHAIN_TARGET_NAME)
|
||||
set(QTKEYCHAIN_TARGET_NAME "Qt5Keychain")
|
||||
endif()
|
||||
list(APPEND APP_TARGETS ${QTKEYCHAIN_TARGET_NAME})
|
||||
endif()
|
||||
if (UNIX AND NOT APPLE)
|
||||
list(APPEND QT5_PACKAGES DBus)
|
||||
endif ()
|
||||
set(QT5_PACKAGES_OPTIONAL TextToSpeech QmlModels)
|
||||
if(ENABLE_APP_PDF_VIEWER)
|
||||
list(APPEND QT5_PACKAGES_OPTIONAL Pdf PdfWidgets)
|
||||
#list(APPEND QT5_PACKAGES_OPTIONAL Pdf PdfWidgets)
|
||||
endif()
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
SET(CMAKE_AUTOUIC ON)
|
||||
|
||||
|
||||
find_package(Qt5 COMPONENTS ${QT5_PACKAGES} REQUIRED)
|
||||
find_package(Qt5 COMPONENTS ${QT5_PACKAGES_OPTIONAL} QUIET)
|
||||
find_package(Qt5 OPTIONAL_COMPONENTS ${QT5_PACKAGES_OPTIONAL} QUIET)
|
||||
|
||||
set(LIBRARIES)
|
||||
set(INCLUDED_DIRECTORIES)
|
||||
foreach (package ${QT5_PACKAGES_OPTIONAL})
|
||||
if ("${Qt5${package}_FOUND}")
|
||||
message("Optional package ${package} found.")
|
||||
list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}")
|
||||
list(APPEND LIBRARIES ${Qt5${package}_LIBRARIES})
|
||||
list(APPEND APP_TARGETS Qt5::${package})
|
||||
string(TOUPPER "${package}" INCLUDE_NAME)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D${INCLUDE_NAME}_ENABLED")
|
||||
else ()
|
||||
message("Optional package ${package} not found.")
|
||||
endif ()
|
||||
endforeach ()
|
||||
foreach (package ${QT5_PACKAGES})
|
||||
#list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}")
|
||||
# `qt5_create_translation` is provided from `LinguistTools` package.
|
||||
# But the `Qt5::LinguistTools` lib does not exist. Remove it.
|
||||
if (NOT (${package} STREQUAL LinguistTools))
|
||||
list(APPEND PLUGIN_TARGETS Qt5::${package})
|
||||
list(APPEND APP_TARGETS Qt5::${package})
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
bc_git_version(${TARGET_NAME} ${PROJECT_VERSION})
|
||||
# Still needed?
|
||||
#bc_git_version(${TARGET_NAME} ${PROJECT_VERSION})
|
||||
|
||||
#-------------------------------------------------
|
||||
set(ASSETS_DIR "assets")
|
||||
|
|
@ -683,6 +706,8 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake" "${CMAKE_CURRENT
|
|||
|
||||
include_directories(src/)
|
||||
include_directories("${LINPHONE_OUTPUT_DIR}/include/OpenGL")
|
||||
include_directories("${LINPHONE_OUTPUT_DIR}/include/")
|
||||
include_directories("${QTKEYCHAIN_OUTPUT_DIR}/include/")
|
||||
|
||||
if (CMAKE_INSTALL_RPATH)
|
||||
#Retrieve lib path from a know QT executable
|
||||
|
|
@ -704,7 +729,7 @@ if(WIN32)
|
|||
endif()
|
||||
|
||||
add_library(${APP_PLUGIN} SHARED ${PLUGIN_SOURCES} ${PLUGIN_HEADERS})
|
||||
add_library(${APP_LIBRARY} OBJECT ${SOURCES} ${HEADERS} ${QML_SOURCES} ${QRC_RESOURCES} ${QRC_WEBVIEW_RESOURCES} ${PLUGIN_HEADERS})#Need to add Headers to resolve moc Qt symbols
|
||||
add_library(${APP_LIBRARY} OBJECT ${SOURCES} ${HEADERS} ${QML_SOURCES} ${QRC_RESOURCES} ${QRC_WEBVIEW_RESOURCES})
|
||||
|
||||
if (WIN32)
|
||||
add_executable(${TARGET_NAME} WIN32 $<TARGET_OBJECTS:${APP_LIBRARY}> ${MAIN_FILE} ${QRC_BIG_RESOURCES} ${RC_FILE})
|
||||
|
|
@ -730,8 +755,6 @@ set_property(TARGET ${APP_PLUGIN} PROPERTY POSITION_INDEPENDENT_CODE ON) #Need
|
|||
set_property(TARGET ${APP_LIBRARY} PROPERTY AUTORCC ON)
|
||||
set_property(TARGET ${APP_PLUGIN} PROPERTY AUTORCC ON)
|
||||
|
||||
|
||||
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "${EXECUTABLE_NAME}")
|
||||
|
||||
if(MSVC)
|
||||
|
|
@ -742,39 +765,9 @@ endif()
|
|||
target_compile_definitions(${APP_PLUGIN} PUBLIC "-DENABLE_APP_EXPORT_PLUGIN")
|
||||
set_target_properties(${APP_PLUGIN} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
|
||||
list(APPEND INCLUDED_DIRECTORIES "${LINPHONECXX_INCLUDE_DIRS}" "${BCToolbox_INCLUDE_DIRS}" "${MEDIASTREAMER2_INCLUDE_DIRS}")
|
||||
list(APPEND INCLUDED_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/include")
|
||||
|
||||
set(LIBRARIES_LIST ${BCToolbox_CORE_LIBRARIES} ${Belr_LIBRARIES} ${Belcard_LIBRARIES} ${BelleSIP_LIBRARIES} ${LINPHONE_LIBRARIES} ${LINPHONECXX_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${ORTP_LIBRARIES} ${OPUS_LIBRARIES})
|
||||
|
||||
if(ENABLE_QT_KEYCHAIN)
|
||||
list(APPEND LIBRARIES_LIST ${QtKeychain_LIBRARIES})
|
||||
endif()
|
||||
|
||||
list(APPEND LIBRARIES ${LIBRARIES_LIST})
|
||||
|
||||
if(ENABLE_BUILD_VERBOSE)
|
||||
message("LIBRARIES : ${LIBRARIES}")
|
||||
endif()
|
||||
foreach (package ${QT5_PACKAGES})
|
||||
list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}")
|
||||
# `qt5_create_translation` is provided from `LinguistTools` package.
|
||||
# But the `Qt5::LinguistTools` lib does not exist. Remove it.
|
||||
if (NOT (${package} STREQUAL LinguistTools))
|
||||
# list(APPEND LIBRARIES ${Qt5${package}_LIBRARIES})
|
||||
target_link_libraries(${APP_LIBRARY} Qt5::${package})
|
||||
target_link_libraries(${APP_PLUGIN} Qt5::${package})
|
||||
target_link_libraries(${TARGET_NAME} Qt5::${package})
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
|
||||
|
||||
if(ENABLE_QT_KEYCHAIN)
|
||||
target_link_libraries(${APP_LIBRARY} ${QTKEYCHAIN_TARGET_NAME})
|
||||
target_link_libraries(${APP_PLUGIN} ${QTKEYCHAIN_TARGET_NAME})
|
||||
target_link_libraries(${TARGET_NAME} ${QTKEYCHAIN_TARGET_NAME})
|
||||
endif()
|
||||
|
||||
|
||||
function(add_framework_library FW_NAME)
|
||||
|
|
@ -785,65 +778,48 @@ function(add_framework_library FW_NAME)
|
|||
endfunction()
|
||||
|
||||
if (APPLE)
|
||||
list(APPEND LIBRARIES "-framework Cocoa" "-framework IOKit" "-framework AVFoundation")
|
||||
add_framework_library(linphone++)
|
||||
add_framework_library(belcard)
|
||||
add_framework_library(bctoolbox)
|
||||
add_framework_library(linphone)
|
||||
add_framework_library(mediastreamer2)
|
||||
#add_framework_library(linphone++)
|
||||
#add_framework_library(belcard)
|
||||
#add_framework_library(bctoolbox)
|
||||
#add_framework_library(linphone)
|
||||
#add_framework_library(mediastreamer2)
|
||||
# -framework linphone") #This doesn't work yet
|
||||
endif ()
|
||||
|
||||
target_include_directories(${APP_LIBRARY} SYSTEM PUBLIC ${INCLUDED_DIRECTORIES})
|
||||
target_include_directories(${APP_PLUGIN} SYSTEM PUBLIC ${INCLUDED_DIRECTORIES})
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${INCLUDED_DIRECTORIES})
|
||||
foreach(T ${PLUGIN_TARGETS})
|
||||
target_include_directories(${APP_PLUGIN} SYSTEM PUBLIC $<TARGET_PROPERTY:${T},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
target_link_libraries(${APP_PLUGIN} ${T})
|
||||
endforeach()
|
||||
|
||||
if(ENABLE_QT_KEYCHAIN)
|
||||
target_include_directories(${APP_LIBRARY} SYSTEM PUBLIC $<TARGET_PROPERTY:${QTKEYCHAIN_TARGET_NAME},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
target_include_directories(${APP_PLUGIN} SYSTEM PUBLIC $<TARGET_PROPERTY:${QTKEYCHAIN_TARGET_NAME},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC $<TARGET_PROPERTY:${QTKEYCHAIN_TARGET_NAME},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
foreach(T ${APP_TARGETS})
|
||||
target_include_directories(${APP_LIBRARY} SYSTEM PUBLIC $<TARGET_PROPERTY:${T},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
target_link_libraries(${TARGET_NAME} ${T})
|
||||
endforeach()
|
||||
|
||||
if (APPLE)
|
||||
target_link_libraries(${TARGET_NAME} "-framework Cocoa" "-framework IOKit" "-framework AVFoundation")
|
||||
endif()
|
||||
|
||||
link_directories(BEFORE "${LINPHONE_OUTPUT_DIR}/lib")
|
||||
target_link_directories(${APP_LIBRARY} PUBLIC "${LINPHONE_OUTPUT_DIR}/lib")
|
||||
target_link_directories(${APP_PLUGIN} PUBLIC "${LINPHONE_OUTPUT_DIR}/lib")
|
||||
|
||||
target_link_libraries(${APP_LIBRARY} ${LIBRARIES})
|
||||
target_link_libraries(${APP_PLUGIN} ${LIBRARIES})
|
||||
target_link_libraries(${APP_LIBRARY} ${APP_PLUGIN})
|
||||
target_link_libraries(${TARGET_NAME} ${LIBRARIES})
|
||||
target_link_libraries(${TARGET_NAME} ${APP_PLUGIN})
|
||||
|
||||
|
||||
if(WIN32 AND ENABLE_LDAP)
|
||||
find_package(OpenLDAP REQUIRED)
|
||||
target_link_libraries(${TARGET_NAME} wsock32 ws2_32 ${OPENLDAP_LIBRARIES})
|
||||
endif()
|
||||
|
||||
add_dependencies(${APP_LIBRARY} ${LINPHONE_TARGETS})
|
||||
add_dependencies(${APP_PLUGIN} ${LINPHONE_TARGETS})
|
||||
|
||||
add_dependencies(${APP_LIBRARY} update_translations ${TARGET_NAME}-git-version ${APP_PLUGIN})
|
||||
add_dependencies(${TARGET_NAME} ${APP_LIBRARY} ${APP_PLUGIN})
|
||||
|
||||
|
||||
add_dependencies(${APP_LIBRARY} update_translations ${APP_PLUGIN})
|
||||
# ------------------------------------------------------------------------------
|
||||
# CPack settings & RPM.
|
||||
# ------------------------------------------------------------------------------
|
||||
set(TOOLS_DIR "${CMAKE_BINARY_DIR}/programs")
|
||||
set(LINPHONE_BUILDER_SIGNING_IDENTITY ${LINPHONE_BUILDER_SIGNING_IDENTITY})
|
||||
|
||||
add_custom_command(TARGET ${TARGET_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/include/" "${CMAKE_INSTALL_PREFIX}/include/")
|
||||
add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/")
|
||||
add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/include/" "${CMAKE_INSTALL_PREFIX}/include/")
|
||||
add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${APP_PLUGIN}> "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/")
|
||||
add_custom_command(TARGET ${APP_PLUGIN} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_LINKER_FILE:${APP_PLUGIN}> "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/")
|
||||
#add_custom_command(TARGET ${TARGET_NAME} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/include/LinphoneApp/*" "${CMAKE_INSTALL_PREFIX}/include/LinphoneApp/")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/*" "${CMAKE_INSTALL_PREFIX}/include/LinphoneApp/" COPYONLY)
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include" DESTINATION ".")
|
||||
|
||||
|
|
|
|||
|
|
@ -19,58 +19,42 @@
|
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# This module will set the following variables in your project:
|
||||
#
|
||||
# - Find the bctoolbox include files and library
|
||||
# LINPHONE_TARGETS - Add usable targets into this list.
|
||||
# BCToolbox_FOUND - System has lib bctoolbox
|
||||
# BCToolbox_INCLUDE_DIRS - The bctoolbox include directories
|
||||
# BCToolbox_LIBRARIES - The libraries needed to use bctoolbox
|
||||
# BCToolbox_CMAKE_DIR - The bctoolbox cmake directory
|
||||
# BCToolbox_CORE_FOUND - System has core bctoolbox
|
||||
# BCToolbox_CORE_INCLUDE_DIRS - The core bctoolbox include directories
|
||||
# BCToolbox_CORE_LIBRARIES - The core bctoolbox libraries
|
||||
# BCToolbox_TESTER_FOUND - System has bctoolbox tester
|
||||
# BCToolbox_TESTER_INCLUDE_DIRS - The bctoolbox tester include directories
|
||||
# BCToolbox_TESTER_LIBRARIES - The bctoolbox tester libraries
|
||||
# BCToolbox_FOUND - The bctoolbox library has been found
|
||||
# BCToolbox_TARGET - The name of the CMake target for the bctoolbox library
|
||||
# BCToolbox_CMAKE_DIR - The bctoolbox CMake directory
|
||||
# BCToolbox_CMAKE_UTILS - The path to the bctoolbox CMake utils script
|
||||
# BCToolbox_tester_FOUND - The bctoolbox-tester library has been found
|
||||
# BCToolbox_tester_TARGET - The name of the CMake target for the bctoolbox-tester library
|
||||
|
||||
|
||||
if(NOT TARGET bctoolbox)
|
||||
set(EXPORT_PATH ${LINPHONE_OUTPUT_DIR})
|
||||
include(GNUInstallDirs)
|
||||
set(BCToolbox_CMAKE_DIR ${EXPORT_PATH}/${CMAKE_INSTALL_DATADIR}/bctoolbox/cmake)
|
||||
include(${BCToolbox_CMAKE_DIR}/bctoolboxTargets.cmake)
|
||||
else()
|
||||
get_target_property(BCToolbox_SOURCE_DIR bctoolbox SOURCE_DIR)
|
||||
set(BCToolbox_CMAKE_DIR "${BCToolbox_SOURCE_DIR}/../cmake")
|
||||
endif()
|
||||
|
||||
set(_BCToolbox_REQUIRED_VARS BCToolbox_TARGET BCToolbox_CMAKE_DIR BCToolbox_CMAKE_UTILS)
|
||||
set(_BCToolbox_CACHE_VARS ${_BCToolbox_REQUIRED_VARS})
|
||||
|
||||
if(TARGET bctoolbox)
|
||||
list(APPEND LINPHONE_TARGETS bctoolbox)
|
||||
include(${BCToolbox_CMAKE_DIR}/BCToolboxCMakeUtils.cmake)
|
||||
set(BCToolbox_CORE_LIBRARIES bctoolbox)
|
||||
get_target_property(BCToolbox_CORE_INCLUDE_DIRS bctoolbox INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(BCToolbox_CORE_FOUND TRUE)
|
||||
set(BCToolbox_TARGET bctoolbox)
|
||||
get_target_property(_BCToolbox_SOURCE_DIR ${BCToolbox_TARGET} SOURCE_DIR)
|
||||
set(BCToolbox_CMAKE_DIR "${_BCToolbox_SOURCE_DIR}/../cmake")
|
||||
set(BCToolbox_CMAKE_UTILS "${BCToolbox_CMAKE_DIR}/BCToolboxCMakeUtils.cmake")
|
||||
if(TARGET bctoolbox-tester)
|
||||
set(BCToolbox_tester_FOUND TRUE)
|
||||
set(BCToolbox_tester_TARGET bctoolbox-tester)
|
||||
list(APPEND _BCToolbox_CACHE_VARS BCToolbox_tester_TARGET)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TARGET bctoolbox-tester)
|
||||
set(BCToolbox_TESTER_LIBRARIES bctoolbox-tester)
|
||||
get_target_property(BCToolbox_TESTER_INCLUDE_DIRS bctoolbox-tester INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(BCToolbox_TESTER_FOUND TRUE)
|
||||
set(BCToolbox_TESTER_COMPONENT_VARIABLES BCToolbox_TESTER_FOUND BCToolbox_TESTER_INCLUDE_DIRS BCToolbox_TESTER_LIBRARIES)
|
||||
endif()
|
||||
set(BCToolbox_LIBRARIES ${BCToolbox_CORE_LIBRARIES} ${BCToolbox_TESTER_LIBRARIES})
|
||||
set(BCToolbox_INCLUDE_DIRS ${BCToolbox_CORE_INCLUDE_DIRS} ${BCToolbox_TESTER_INCLUDE_DIRS})
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(BCToolbox
|
||||
DEFAULT_MSG
|
||||
BCToolbox_INCLUDE_DIRS BCToolbox_LIBRARIES BCToolbox_CMAKE_DIR
|
||||
BCToolbox_CORE_FOUND BCToolbox_CORE_INCLUDE_DIRS BCToolbox_CORE_LIBRARIES
|
||||
${BCToolbox_TESTER_COMPONENT_VARIABLES}
|
||||
)
|
||||
|
||||
mark_as_advanced(
|
||||
BCToolbox_INCLUDE_DIRS BCToolbox_LIBRARIES BCToolbox_CMAKE_DIR
|
||||
BCToolbox_CORE_FOUND BCToolbox_CORE_INCLUDE_DIRS BCToolbox_CORE_LIBRARIES
|
||||
${BCToolbox_TESTER_COMPONENT_VARIABLES}
|
||||
)
|
||||
endif()
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(BCToolbox
|
||||
REQUIRED_VARS ${_BCToolbox_REQUIRED_VARS}
|
||||
HANDLE_COMPONENTS
|
||||
)
|
||||
mark_as_advanced(${_BCToolbox_CACHE_VARS})
|
||||
|
|
|
|||
|
|
@ -20,31 +20,25 @@
|
|||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the belcard include files and library
|
||||
#
|
||||
# LINPHONE_TARGETS - Add usable targets into this list.
|
||||
# Belcard_FOUND - system has lib belcard
|
||||
# Belcard_INCLUDE_DIRS - the belcard include directory
|
||||
# Belcard_LIBRARIES - The library needed to use belcard
|
||||
# Belcard_FOUND - The liblinphone library has been found
|
||||
# Belcard_TARGET - The name of the CMake target
|
||||
|
||||
if(NOT TARGET belcard)
|
||||
set(EXPORT_PATH ${LINPHONE_OUTPUT_DIR})
|
||||
include(GNUInstallDirs)
|
||||
include(${EXPORT_PATH}/${CMAKE_INSTALL_DATADIR}/belcard/cmake/belcardTargets.cmake)
|
||||
include(${EXPORT_PATH}/${CMAKE_INSTALL_DATADIR}/Belcard/cmake/BelcardTargets.cmake)
|
||||
endif()
|
||||
|
||||
set(_Belcard_REQUIRED_VARS Belcard_TARGET)
|
||||
set(_Belcard_CACHE_VARS ${_Belcard_REQUIRED_VARS})
|
||||
|
||||
if(TARGET belcard)
|
||||
list(APPEND LINPHONE_TARGETS belcard)
|
||||
set(Belcard_LIBRARIES belcard)
|
||||
get_target_property(Belcard_INCLUDE_DIRS belcard INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Belcard
|
||||
DEFAULT_MSG
|
||||
Belcard_INCLUDE_DIRS Belcard_LIBRARIES
|
||||
)
|
||||
|
||||
mark_as_advanced(Belcard_INCLUDE_DIRS Belcard_LIBRARIES)
|
||||
|
||||
set(Belcard_TARGET belcard)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Belcard
|
||||
REQUIRED_VARS ${_Belcard_REQUIRED_VARS}
|
||||
HANDLE_COMPONENTS
|
||||
)
|
||||
mark_as_advanced(${_Belcard_CACHE_VARS})
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
############################################################################
|
||||
# FindBelr.cmake
|
||||
# Copyright (C) 2023 Belledonne Communications, Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the belcard include files and library
|
||||
#
|
||||
# LINPHONE_TARGETS - Add usable targets into this list.
|
||||
# BelleSIP_FOUND - system has lib belcard
|
||||
# BelleSIP_INCLUDE_DIRS - the belcard include directory
|
||||
# BelleSIP_LIBRARIES - The library needed to use belcard
|
||||
|
||||
if(NOT TARGET belle-sip)
|
||||
set(EXPORT_PATH ${LINPHONE_OUTPUT_DIR})
|
||||
include(GNUInstallDirs)
|
||||
include(${EXPORT_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake/BelleSIP/BelleSIPTargets.cmake)
|
||||
endif()
|
||||
|
||||
if(TARGET belle-sip)
|
||||
list(APPEND LINPHONE_TARGETS belle-sip)
|
||||
|
||||
set(BelleSIP_LIBRARIES belle-sip)
|
||||
get_target_property(BelleSIP_INCLUDE_DIRS belle-sip INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(BelleSIP
|
||||
DEFAULT_MSG
|
||||
BelleSIP_INCLUDE_DIRS BelleSIP_LIBRARIES
|
||||
)
|
||||
|
||||
mark_as_advanced(BelleSIP_INCLUDE_DIRS BelleSIP_LIBRARIES)
|
||||
|
||||
endif()
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
############################################################################
|
||||
# FindBelr.cmake
|
||||
# Copyright (C) 2023 Belledonne Communications, Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the belcard include files and library
|
||||
#
|
||||
# LINPHONE_TARGETS - Add usable targets into this list.
|
||||
# Belr_FOUND - system has lib belcard
|
||||
# Belr_INCLUDE_DIRS - the belcard include directory
|
||||
# Belr_LIBRARIES - The library needed to use belcard
|
||||
|
||||
if(NOT TARGET belr)
|
||||
set(EXPORT_PATH ${LINPHONE_OUTPUT_DIR})
|
||||
include(GNUInstallDirs)
|
||||
include(${EXPORT_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake/belr/belrTargets.cmake)
|
||||
endif()
|
||||
|
||||
if(TARGET belr)
|
||||
list(APPEND LINPHONE_TARGETS belr)
|
||||
|
||||
set(Belr_LIBRARIES belr)
|
||||
get_target_property(Belr_INCLUDE_DIRS belr INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Belr
|
||||
DEFAULT_MSG
|
||||
Belr_INCLUDE_DIRS Belr_LIBRARIES
|
||||
)
|
||||
|
||||
mark_as_advanced(Belr_INCLUDE_DIRS Belr_LIBRARIES)
|
||||
|
||||
endif()
|
||||
|
|
@ -20,13 +20,9 @@
|
|||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the linphone include files and library
|
||||
#
|
||||
# LINPHONE_TARGETS - Add usable targets into this list.
|
||||
# LINPHONE_FOUND - system has lib linphone
|
||||
# LINPHONE_INCLUDE_DIRS - the linphone include directory
|
||||
# LINPHONE_LIBRARIES - The library needed to use linphone
|
||||
# LINPHONE_LIBRARY_OUTPUT_DIRECTORY - Output directory for likbraries
|
||||
# LibLinphone_FOUND - The liblinphone library has been found
|
||||
# LibLinphone_TARGET - The name of the CMake target for the liblinphone library
|
||||
# LibLinphone_PLUGINS_DIR - The directory where to install liblinphone plugins
|
||||
|
||||
if(NOT TARGET liblinphone)
|
||||
set(EXPORT_PATH ${LINPHONE_OUTPUT_DIR})
|
||||
|
|
@ -34,18 +30,17 @@ if(NOT TARGET liblinphone)
|
|||
include(${EXPORT_PATH}/${CMAKE_INSTALL_DATADIR}/linphone/cmake/linphoneTargets.cmake)
|
||||
endif()
|
||||
|
||||
set(_LibLinphone_REQUIRED_VARS LibLinphone_TARGET LibLinphone_PLUGINS_DIR)
|
||||
set(_LibLinphone_CACHE_VARS ${_LibLinphone_REQUIRED_VARS})
|
||||
|
||||
if(TARGET liblinphone)
|
||||
list(APPEND LINPHONE_TARGETS liblinphone)
|
||||
|
||||
set(LINPHONE_LIBRARIES liblinphone)
|
||||
get_target_property(LINPHONE_INCLUDE_DIRS liblinphone INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Linphone
|
||||
DEFAULT_MSG
|
||||
LINPHONE_INCLUDE_DIRS LINPHONE_LIBRARIES
|
||||
)
|
||||
|
||||
mark_as_advanced(LINPHONE_INCLUDE_DIRS LINPHONE_LIBRARIES)
|
||||
|
||||
set(LibLinphone_TARGET liblinphone)
|
||||
get_target_property(LibLinphone_PLUGINS_DIR ${LibLinphone_TARGET} LIBLINPHONE_PLUGINS_DIR)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibLinphone
|
||||
REQUIRED_VARS ${_LibLinphone_REQUIRED_VARS}
|
||||
HANDLE_COMPONENTS
|
||||
)
|
||||
mark_as_advanced(${_LibLinphone_CACHE_VARS})
|
||||
|
|
@ -20,12 +20,8 @@
|
|||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the linphonecxx include files and library
|
||||
#
|
||||
# LINPHONE_TARGETS - Add usable targets into this list.
|
||||
# LINPHONECXX_FOUND - system has lib linphonecxx
|
||||
# LINPHONECXX_INCLUDE_DIRS - the linphonecxx include directory
|
||||
# LINPHONECXX_LIBRARIES - The library needed to use linphonecxx
|
||||
# LibLinphoneCxx_FOUND - The liblinphone library has been found
|
||||
# LibLinphoneCxx_TARGET - The name of the CMake target for the liblinphone library
|
||||
|
||||
if(NOT TARGET liblinphone++)
|
||||
set(EXPORT_PATH ${LINPHONE_OUTPUT_DIR})
|
||||
|
|
@ -33,18 +29,17 @@ if(NOT TARGET liblinphone++)
|
|||
include(${EXPORT_PATH}/${CMAKE_INSTALL_DATADIR}/LinphoneCxx/cmake/LinphoneCxxTargets.cmake)
|
||||
endif()
|
||||
|
||||
set(_LibLinphoneCxx_REQUIRED_VARS LibLinphoneCxx_TARGET)
|
||||
set(_LibLinphoneCxx_CACHE_VARS ${_LibLinphoneCxx_REQUIRED_VARS})
|
||||
|
||||
if(TARGET liblinphone++)
|
||||
list(APPEND LINPHONE_TARGETS liblinphone++)
|
||||
set(LINPHONECXX_LIBRARIES liblinphone++)
|
||||
get_target_property(LINPHONECXX_INCLUDE_DIRS liblinphone++ INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LinphoneCxx
|
||||
DEFAULT_MSG
|
||||
LINPHONECXX_INCLUDE_DIRS LINPHONECXX_LIBRARIES
|
||||
)
|
||||
|
||||
mark_as_advanced(LINPHONECXX_INCLUDE_DIRS LINPHONECXX_LIBRARIES)
|
||||
|
||||
set(LibLinphoneCxx_TARGET liblinphone++)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibLinphoneCxx
|
||||
REQUIRED_VARS ${_LibLinphoneCxx_REQUIRED_VARS}
|
||||
HANDLE_COMPONENTS
|
||||
)
|
||||
mark_as_advanced(${_LibLinphoneCxx_CACHE_VARS})
|
||||
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
############################################################################
|
||||
# FindLime.cmake
|
||||
# Copyright (C) 2023 Belledonne Communications, Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the belcard include files and library
|
||||
#
|
||||
# LINPHONE_TARGETS - Add usable targets into this list.
|
||||
# Lime_FOUND - system has lib belcard
|
||||
# Lime_INCLUDE_DIRS - the belcard include directory
|
||||
# Lime_LIBRARIES - The library needed to use belcard
|
||||
|
||||
if(NOT TARGET lime)
|
||||
set(EXPORT_PATH ${LINPHONE_OUTPUT_DIR})
|
||||
include(GNUInstallDirs)
|
||||
include(${EXPORT_PATH}/${CMAKE_INSTALL_DATADIR}/lime/cmake/limeTargets.cmake)
|
||||
endif()
|
||||
|
||||
if(TARGET lime)
|
||||
list(APPEND LINPHONE_TARGETS lime)
|
||||
set(Lime_LIBRARIES lime)
|
||||
get_target_property(Lime_INCLUDE_DIRS lime INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Lime
|
||||
DEFAULT_MSG
|
||||
Lime_INCLUDE_DIRS Lime_LIBRARIES
|
||||
)
|
||||
|
||||
mark_as_advanced(Lime_INCLUDE_DIRS Lime_LIBRARIES)
|
||||
endif()
|
||||
|
|
@ -20,13 +20,11 @@
|
|||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the mediastreamer2 include files and library
|
||||
# This module will set the following variables in your project:
|
||||
#
|
||||
# LINPHONE_TARGETS - Add usable targets into this list.
|
||||
# MEDIASTREAMER2_FOUND - system has lib mediastreamer2
|
||||
# MEDIASTREAMER2_INCLUDE_DIRS - the mediasteamer2 include directory
|
||||
# MEDIASTREAMER2_LIBRARIES - The library needed to use mediasteamer2
|
||||
# MEDIASTREAMER2_PLUGINS_LOCATION - The location of the mediastreamer2 plugins
|
||||
# Mediastreamer2_FOUND - The mediastreamer2 library has been found
|
||||
# Mediastreamer2_TARGET - The name of the CMake target for the mediastreamer2 library
|
||||
# Mediastreamer2_PLUGINS_DIR - The directory where to install mediastreamer2 plugins
|
||||
|
||||
if(NOT TARGET mediastreamer2)
|
||||
set(EXPORT_PATH ${LINPHONE_OUTPUT_DIR})
|
||||
|
|
@ -34,19 +32,18 @@ if(NOT TARGET mediastreamer2)
|
|||
include(${EXPORT_PATH}/${CMAKE_INSTALL_DATADIR}/Mediastreamer2/cmake/Mediastreamer2Targets.cmake)
|
||||
endif()
|
||||
|
||||
set(_Mediastreamer2_REQUIRED_VARS Mediastreamer2_TARGET Mediastreamer2_PLUGINS_DIR)
|
||||
set(_Mediastreamer2_CACHE_VARS ${_Mediastreamer2_REQUIRED_VARS})
|
||||
|
||||
if(TARGET mediastreamer2)
|
||||
list(APPEND LINPHONE_TARGETS mediastreamer2)
|
||||
set(MEDIASTREAMER2_LIBRARIES mediastreamer2)
|
||||
get_target_property(MEDIASTREAMER2_INCLUDE_DIRS mediastreamer2 INTERFACE_INCLUDE_DIRECTORIES)
|
||||
define_property(TARGET PROPERTY "MS2_PLUGINS" BRIEF_DOCS "Stores the location of mediastreamer2 plugins" FULL_DOCS "Stores the location of mediastreamer2 plugins")
|
||||
get_target_property(MEDIASTREAMER2_PLUGINS_LOCATION mediastreamer2 MS2_PLUGINS)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Mediastreamer2
|
||||
DEFAULT_MSG
|
||||
MEDIASTREAMER2_INCLUDE_DIRS MEDIASTREAMER2_LIBRARIES
|
||||
)
|
||||
|
||||
mark_as_advanced(MEDIASTREAMER2_INCLUDE_DIRS MEDIASTREAMER2_LIBRARIES)
|
||||
|
||||
set(Mediastreamer2_TARGET mediastreamer2)
|
||||
get_target_property(Mediastreamer2_PLUGINS_DIR ${Mediastreamer2_TARGET} MS2_PLUGINS_DIR)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Mediastreamer2
|
||||
REQUIRED_VARS ${_Mediastreamer2_REQUIRED_VARS}
|
||||
HANDLE_COMPONENTS
|
||||
)
|
||||
mark_as_advanced(${_Mediastreamer2_CACHE_VARS})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
############################################################################
|
||||
# FindMinizip.cmake
|
||||
# Copyright (C) 2018 Belledonne Communications, Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the minizip include file and library
|
||||
#
|
||||
# MINIZIP_FOUND - system has minizip
|
||||
# MINIZIP_INCLUDE_DIRS - the minizip include directory
|
||||
# MINIZIP_LIBRARIES - The libraries needed to use minizip
|
||||
|
||||
find_path(MINIZIP_INCLUDE_DIRS
|
||||
NAMES mz.h
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
|
||||
if(MINIZIP_INCLUDE_DIRS)
|
||||
set(HAVE_MZ_H 1)
|
||||
endif()
|
||||
|
||||
find_library(MINIZIP_LIBRARIES
|
||||
NAMES minizip minizipd
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Minizip
|
||||
DEFAULT_MSG
|
||||
MINIZIP_INCLUDE_DIRS MINIZIP_LIBRARIES HAVE_MZ_H
|
||||
)
|
||||
|
||||
mark_as_advanced(MINIZIP_INCLUDE_DIRS MINIZIP_LIBRARIES HAVE_MZ_H)
|
||||
|
|
@ -18,67 +18,110 @@
|
|||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the OpenLDAP include file and library
|
||||
# This module will set the following variables in your project:
|
||||
#
|
||||
# LINPHONE_TARGETS - Add usable targets into this list.
|
||||
# OPENLDAP_FOUND - system has OpenLDAP
|
||||
# OPENLDAP_INCLUDE_DIRS - the OpenLDAP include directory
|
||||
# OPENLDAP_LIBRARIES - The libraries needed to use OpenLDAP
|
||||
# OpenLDAP_FOUND - The ldap library has been found
|
||||
# OpenLDAP_TARGETS - The list of the names of the CMake targets for the openldap libraries
|
||||
# OpenLDAP_TARGET - The name of the CMake target for the ldap library
|
||||
# OpenLDAP_lber_TARGET - The name of the CMake target for the lber library
|
||||
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
set(_OpenLDAP_REQUIRED_VARS OpenLDAP_TARGETS OpenLDAP_TARGET)
|
||||
set(_OpenLDAP_CACHE_VARS ${_OpenLDAP_REQUIRED_VARS})
|
||||
|
||||
if(TARGET ldap)
|
||||
list(APPEND LINPHONE_TARGETS ldap)
|
||||
set(OPENLDAP_LIBRARIES ldap)
|
||||
get_target_property(OPENLDAP_INCLUDE_DIRS ldap INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
set(OpenLDAP_TARGET ldap)
|
||||
set(OpenLDAP_TARGETS ldap)
|
||||
if(TARGET lber)
|
||||
set(OpenLDAP_lber_TARGET lber)
|
||||
list(APPEND OpenLDAP_TARGETS lber)
|
||||
list(APPEND _OpenLDAP_CACHE_VARS OpenLDAP_lber_TARGET)
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
#Note : There are double find* because of priority given to the HINTS first. The second call will keep the result if there is one.
|
||||
#INCLUDES
|
||||
find_path(OPENLDAP_INCLUDE_DIRS
|
||||
# Note : There are double find* because of priority given to the HINTS first. The second call will keep the result if there is one.
|
||||
|
||||
find_path(_OpenLDAP_INCLUDE_DIRS
|
||||
NAMES ldap.h
|
||||
PATH_SUFFIXES include/openldap
|
||||
HINTS "${CMAKE_INSTALL_PREFIX}"
|
||||
PATH_SUFFIXES include/openldap
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_path(OPENLDAP_INCLUDE_DIRS
|
||||
find_path(_OpenLDAP_INCLUDE_DIRS
|
||||
NAMES ldap.h
|
||||
PATH_SUFFIXES include/openldap
|
||||
HINTS "${CMAKE_INSTALL_PREFIX}"
|
||||
PATH_SUFFIXES include/openldap
|
||||
)
|
||||
|
||||
#LDAP
|
||||
find_library(LDAP_LIB
|
||||
find_library(_OpenLDAP_LIBRARY
|
||||
NAMES ldap libldap
|
||||
HINTS "${CMAKE_INSTALL_PREFIX}"
|
||||
PATH_SUFFIXES lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(LDAP_LIB
|
||||
find_library(_OpenLDAP_LIBRARY
|
||||
NAMES ldap libldap
|
||||
HINTS "${CMAKE_INSTALL_PREFIX}"
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
|
||||
#LBER
|
||||
find_library(LBER_LIB
|
||||
find_library(_OpenLDAP_lber_LIBRARY
|
||||
NAMES lber liblber
|
||||
HINTS "${CMAKE_INSTALL_PREFIX}"
|
||||
PATH_SUFFIXES lib
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(LBER_LIB
|
||||
find_library(_OpenLDAP_lber_LIBRARY
|
||||
NAMES lber liblber
|
||||
HINTS "${CMAKE_INSTALL_PREFIX}"
|
||||
PATH_SUFFIXES lib
|
||||
)
|
||||
set(OPENLDAP_LIBRARIES ${LDAP_LIB} ${LBER_LIB})
|
||||
|
||||
if(_OpenLDAP_INCLUDE_DIRS AND _OpenLDAP_LIBRARY)
|
||||
add_library(ldap UNKNOWN IMPORTED)
|
||||
if(WIN32)
|
||||
set_target_properties(ldap PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_OpenLDAP_INCLUDE_DIRS}"
|
||||
IMPORTED_IMPLIB "${_OpenLDAP_LIBRARY}"
|
||||
)
|
||||
else()
|
||||
set_target_properties(ldap PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_OpenLDAP_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${_OpenLDAP_LIBRARY}"
|
||||
)
|
||||
endif()
|
||||
set(OpenLDAP_TARGET ldap)
|
||||
set(OpenLDAP_TARGETS ldap)
|
||||
|
||||
if(_OpenLDAP_lber_LIBRARY)
|
||||
add_library(lber UNKNOWN IMPORTED)
|
||||
if(WIN32)
|
||||
set_target_properties(lber PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_OpenLDAP_INCLUDE_DIRS}"
|
||||
IMPORTED_IMPLIB "${_OpenLDAP_lber_LIBRARY}"
|
||||
)
|
||||
else()
|
||||
set_target_properties(lber PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_OpenLDAP_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${_OpenLDAP_lber_LIBRARY}"
|
||||
)
|
||||
endif()
|
||||
set(OpenLDAP_lber_TARGET lber)
|
||||
set(OpenLDAP_lber_FOUND TRUE)
|
||||
list(APPEND OpenLDAP_TARGETS lber)
|
||||
list(APPEND _OpenLDAP_CACHE_VARS OpenLDAP_lber_TARGET)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(OpenLDAP
|
||||
DEFAULT_MSG
|
||||
OPENLDAP_INCLUDE_DIRS OPENLDAP_LIBRARIES
|
||||
REQUIRED_VARS ${_OpenLDAP_REQUIRED_VARS}
|
||||
HANDLE_COMPONENTS
|
||||
)
|
||||
mark_as_advanced(${_OpenLDAP_CACHE_VARS})
|
||||
|
||||
mark_as_advanced(OPENLDAP_INCLUDE_DIRS OPENLDAP_LIBRARIES)
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
############################################################################
|
||||
# FindOrtp.cmake
|
||||
# Copyright (C) 2023 Belledonne Communications, Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# - Find the ortp include files and library
|
||||
#
|
||||
# LINPHONE_TARGETS - Add usable targets into this list.
|
||||
# ORTP_FOUND - system has lib ortp
|
||||
# ORTP_INCLUDE_DIRS - the ortp include directory
|
||||
# ORTP_LIBRARIES - The library needed to use ortp
|
||||
if(NOT TARGET ortp)
|
||||
set(EXPORT_PATH ${LINPHONE_OUTPUT_DIR})
|
||||
include(GNUInstallDirs)
|
||||
include(${EXPORT_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake/ortp/ortpTargets.cmake)
|
||||
endif()
|
||||
|
||||
if(TARGET ortp)
|
||||
list(APPEND LINPHONE_TARGETS ortp)
|
||||
set(ORTP_LIBRARIES ortp)
|
||||
get_target_property(ORTP_INCLUDE_DIRS ortp INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Ortp
|
||||
DEFAULT_MSG
|
||||
ORTP_INCLUDE_DIRS ORTP_LIBRARIES
|
||||
)
|
||||
|
||||
mark_as_advanced(ORTP_INCLUDE_DIRS ORTP_LIBRARIES)
|
||||
|
||||
endif()
|
||||
|
|
@ -25,17 +25,24 @@
|
|||
# QtKeychain_FOUND - system has lib linphonecxx
|
||||
# QtKeychain_INCLUDE_DIRS - the linphonecxx include directory
|
||||
# QtKeychain_LIBRARIES - The library needed to use linphonecxx
|
||||
|
||||
if(TARGET ${QTKEYCHAIN_TARGET_NAME})
|
||||
list(APPEND LINPHONE_TARGETS ${QTKEYCHAIN_TARGET_NAME})
|
||||
set(QtKeychain_LIBRARIES ${QTKEYCHAIN_TARGET_NAME})
|
||||
get_target_property(QtKeychain_INCLUDE_DIRS ${QTKEYCHAIN_TARGET_NAME} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
set(QtKeychain_USE_BUILD_INTERFACE TRUE)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(QtKeychain
|
||||
DEFAULT_MSG
|
||||
QtKeychain_INCLUDE_DIRS QtKeychain_LIBRARIES
|
||||
)
|
||||
mark_as_advanced(QtKeychain_INCLUDE_DIRS QtKeychain_LIBRARIES)
|
||||
if(NOT TARGET ${QTKEYCHAIN_TARGET_NAME})
|
||||
set(EXPORT_PATH ${QTKEYCHAIN_OUTPUT_DIR})
|
||||
include(GNUInstallDirs)
|
||||
include(${EXPORT_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake/${QTKEYCHAIN_TARGET_NAME}/${QTKEYCHAIN_TARGET_NAME}Config.cmake)
|
||||
endif()
|
||||
|
||||
set(_QtKeychain_REQUIRED_VARS QtKeychain_TARGET)
|
||||
set(_QtKeychain_CACHE_VARS ${_QtKeychain_REQUIRED_VARS})
|
||||
|
||||
if(TARGET ${QTKEYCHAIN_TARGET_NAME})
|
||||
set(QtKeychain_TARGET ${QTKEYCHAIN_TARGET_NAME})
|
||||
set(QtKeychain_USE_BUILD_INTERFACE TRUE)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(QtKeychain
|
||||
REQUIRED_VARS ${_QtKeychain_REQUIRED_VARS}
|
||||
HANDLE_COMPONENTS
|
||||
)
|
||||
mark_as_advanced(${_QtKeychain_CACHE_VARS})
|
||||
|
||||
|
|
|
|||
|
|
@ -39,22 +39,26 @@ set(QT_PATH "${Qt5Core_DIR}/../../..")
|
|||
# ==============================================================================
|
||||
# Build package version.
|
||||
# ==============================================================================
|
||||
bc_compute_full_version(APP_PROJECT_VERSION)
|
||||
if (GIT_EXECUTABLE AND NOT(APP_PROJECT_VERSION))
|
||||
|
||||
if (GIT_EXECUTABLE AND NOT(LINPHONEAPP_VERSION))
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} describe --always
|
||||
OUTPUT_VARIABLE APP_PROJECT_VERSION
|
||||
OUTPUT_VARIABLE LINPHONEAPP_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../.."
|
||||
)
|
||||
elseif (NOT(APP_PROJECT_VERSION))
|
||||
set(APP_PROJECT_VERSION "0.0.0")
|
||||
elseif (NOT(LINPHONEAPP_VERSION))
|
||||
set(LINPHONEAPP_VERSION "0.0.0")
|
||||
endif ()
|
||||
|
||||
set(LINPHONE_MAJOR_VERSION)
|
||||
set(LINPHONE_MINOR_VERSION)
|
||||
set(LINPHONE_MICRO_VERSION)
|
||||
set(LINPHONE_BRANCH_VERSION)
|
||||
bc_parse_full_version(${LINPHONEAPP_VERSION} LINPHONE_MAJOR_VERSION LINPHONE_MINOR_VERSION LINPHONE_MICRO_VERSION LINPHONE_BRANCH_VERSION)
|
||||
|
||||
bc_parse_full_version(${APP_PROJECT_VERSION} LINPHONE_MAJOR_VERSION LINPHONE_MINOR_VERSION LINPHONE_MICRO_VERSION LINPHONE_BRANCH_VERSION)
|
||||
set(LINPHONE_VERSION ${LINPHONE_MAJOR_VERSION}.${LINPHONE_MINOR_VERSION}.${LINPHONE_MICRO_VERSION})
|
||||
#string(REGEX REPLACE "([0-9.]+)-?.*" "\\1" LINPHONE_VERSION "${APP_PROJECT_VERSION}")
|
||||
#string(REGEX REPLACE "([0-9.]+)-?.*" "\\1" LINPHONE_VERSION "${LINPHONEAPP_VERSION}")
|
||||
#string(REPLACE "." ";" SPLITTED_LINPHONE_VERSION "${LINPHONE_VERSION}")
|
||||
#list(LENGTH SPLITTED_LINPHONE_VERSION SPLITTED_LINPHONE_VERSION_LENGTH)
|
||||
#list(GET SPLITTED_LINPHONE_VERSION 0 LINPHONE_MAJOR_VERSION)
|
||||
|
|
@ -62,8 +66,8 @@ set(LINPHONE_VERSION ${LINPHONE_MAJOR_VERSION}.${LINPHONE_MINOR_VERSION}.${LINPH
|
|||
#if (SPLITTED_LINPHONE_VERSION_LENGTH GREATER 2)
|
||||
# list(GET SPLITTED_LINPHONE_VERSION 2 LINPHONE_MICRO_VERSION)
|
||||
#endif ()
|
||||
set(PACKAGE_VERSION "${APP_PROJECT_VERSION}")
|
||||
message(STATUS "Versions : ${APP_PROJECT_VERSION}, ${LINPHONE_VERSION}")
|
||||
set(PACKAGE_VERSION "${LINPHONEAPP_VERSION}")
|
||||
message(STATUS "Versions : ${LINPHONEAPP_VERSION}, ${LINPHONE_VERSION}")
|
||||
# ==============================================================================
|
||||
# Preparing the Linphone SDK bundle.
|
||||
# ==============================================================================
|
||||
|
|
@ -90,7 +94,7 @@ endif ()
|
|||
# find_program(7Z_PROGRAM 7z PATHS "$ENV{ProgramFiles}/7-Zip")
|
||||
# if (7Z_PROGRAM)
|
||||
# execute_process(
|
||||
# COMMAND ${7Z_PROGRAM} a -tzip ${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${APP_PROJECT_VERSION}-win32.zip "@${EXECUTABLE_NAME}-sdk.list"
|
||||
# COMMAND ${7Z_PROGRAM} a -tzip ${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${LINPHONEAPP_VERSION}-win32.zip "@${EXECUTABLE_NAME}-sdk.list"
|
||||
# WORKING_DIRECTORY ${LINPHONE_OUTPUT_DIR}
|
||||
# )
|
||||
# else ()
|
||||
|
|
@ -98,8 +102,8 @@ endif ()
|
|||
# endif ()
|
||||
#elseif (APPLE)
|
||||
# execute_process(
|
||||
# COMMAND rm -rf "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${APP_PROJECT_VERSION}-mac.zip"
|
||||
# COMMAND zip -ry "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${APP_PROJECT_VERSION}-mac.zip" . -i "@${EXECUTABLE_NAME}-sdk.list"
|
||||
# COMMAND rm -rf "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${LINPHONEAPP_VERSION}-mac.zip"
|
||||
# COMMAND zip -ry "${CMAKE_BINARY_DIR}/${EXECUTABLE_NAME}-sdk-${LINPHONEAPP_VERSION}-mac.zip" . -i "@${EXECUTABLE_NAME}-sdk.list"
|
||||
# WORKING_DIRECTORY ${LINPHONE_OUTPUT_DIR}
|
||||
# )
|
||||
#endif ()
|
||||
|
|
@ -230,8 +234,8 @@ elseif (APPLE)
|
|||
execute_process(COMMAND install_name_tool -rpath "${LINPHONE_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}" "@executable_path/../Frameworks" "${LIBRARY}")
|
||||
endforeach ()
|
||||
if(ENABLE_QT_KEYCHAIN)
|
||||
file(GLOB SHARED_LIBRARIES "${QTKEYCHAIN_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/lib*.dylib")
|
||||
install(FILES ${SHARED_LIBRARIES} DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks")
|
||||
#file(GLOB SHARED_LIBRARIES "${QTKEYCHAIN_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/lib*.dylib")
|
||||
#install(FILES ${SHARED_LIBRARIES} DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks")
|
||||
endif()
|
||||
install(TARGETS ${APP_PLUGIN}
|
||||
ARCHIVE DESTINATION "${APPLICATION_NAME}.app/Contents/Frameworks"
|
||||
|
|
@ -242,14 +246,8 @@ elseif (APPLE)
|
|||
install(CODE "execute_process(COMMAND install_name_tool -add_rpath \"@executable_path/../lib/\" \"\${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/MacOS/${EXECUTABLE_NAME}\")")
|
||||
|
||||
if (LINPHONE_BUILDER_SIGNING_IDENTITY)
|
||||
install(CODE "file(GLOB FRAMEWORKS_NAMES \"\${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/Frameworks/*\")
|
||||
foreach (FRAMEWORK \${FRAMEWORKS_NAMES})
|
||||
execute_process(COMMAND \"codesign\" \"--options\" \"runtime,library\" \"--force\" \"--deep\" \"--verbose\" \"-s\" \"${LINPHONE_BUILDER_SIGNING_IDENTITY}\" \"\${FRAMEWORK}\")
|
||||
endforeach ()")
|
||||
install(CODE "execute_process(COMMAND \"codesign\" \"--force\" \"--deep\" \"--options\" \"runtime,library\" \"--verbose\" \"-s\" \"${LINPHONE_BUILDER_SIGNING_IDENTITY}\" \"\${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/Frameworks/mediastreamer2.framework/Versions/A/Libraries/libmswebrtc.so\")")
|
||||
if(ENABLE_VIDEO)
|
||||
install(CODE "execute_process(COMMAND \"codesign\" \"--force\" \"--deep\" \"--options\" \"runtime,library\" \"--verbose\" \"-s\" \"${LINPHONE_BUILDER_SIGNING_IDENTITY}\" \"\${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents/Frameworks/mediastreamer2.framework/Versions/A/Libraries/libmsqogl.so\")")
|
||||
endif()
|
||||
set(SIGNING_SEARCH_DIR "${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Content")
|
||||
install(CODE "execute_process(COMMAND bash \"${CMAKE_CURRENT_SOURCE_DIR}/../../tools/sign_package.sh\" codesign \"${LINPHONE_BUILDER_SIGNING_IDENTITY}\" \"\${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app/Contents\" )")
|
||||
install(CODE "execute_process(COMMAND \"codesign\" \"--entitlements\" \"${CMAKE_CURRENT_BINARY_DIR}/../../entitlements.xml\" \"--force\" \"--deep\" \"--options\" \"runtime,library\" \"--verbose\" \"-s\" \"${LINPHONE_BUILDER_SIGNING_IDENTITY}\" \"\${CMAKE_INSTALL_PREFIX}/${APPLICATION_NAME}.app\")")
|
||||
endif ()
|
||||
# install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_NAME}.app" DESTINATION "." USE_SOURCE_PERMISSIONS)
|
||||
|
|
@ -406,6 +404,7 @@ if(${ENABLE_APP_PACKAGING})
|
|||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/linphone_dmg.scpt.in" "${CMAKE_CURRENT_BINARY_DIR}/linphone_dmg.scpt" @ONLY)
|
||||
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/linphone_dmg.scpt")
|
||||
set(CPACK_BINARY_DRAGNDROP ON)
|
||||
set(CPACK_BUNDLE_APPLE_CERT_APP LINPHONE_BUILDER_SIGNING_IDENTITY)
|
||||
set(PACKAGE_EXT "dmg")
|
||||
message(STATUS "Set DragNDrop CPack generator in OUTPUT/Packages")
|
||||
elseif(NOT(WIN32))
|
||||
|
|
@ -497,7 +496,7 @@ if(${ENABLE_APP_PACKAGING})
|
|||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/packaging.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/packaging.cmake" @ONLY)
|
||||
install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/packaging.cmake")
|
||||
if(LINPHONE_SDK_MAKE_RELEASE_FILE_URL)
|
||||
bc_make_release_file("${APP_PROJECT_VERSION}" "${LINPHONE_SDK_MAKE_RELEASE_FILE_URL}/${CPACK_PACKAGE_FILE_NAME}.${PACKAGE_EXT}")
|
||||
bc_make_release_file("${LINPHONEAPP_VERSION}" "${LINPHONE_SDK_MAKE_RELEASE_FILE_URL}/${CPACK_PACKAGE_FILE_NAME}.${PACKAGE_EXT}")
|
||||
endif()
|
||||
include(CPack)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ if (NOT "${CMAKE_INSTALL_PREFIX}" MATCHES .*/_CPack_Packages/.*)
|
|||
execute_process( COMMAND cp -rf "@LINPHONE_QML_DIR@" "WORK/Packages/AppImageDir/" WORKING_DIRECTORY "@CMAKE_INSTALL_PREFIX@/..")
|
||||
execute_process( COMMAND "@CMAKE_CURRENT_SOURCE_DIR@/../../tools/create_appimage.sh" @EXECUTABLE_NAME@ @CPACK_PACKAGE_FILE_NAME@ @QT_PATH@ @LINPHONE_BUILDER_SIGNING_IDENTITY@ RESULT_VARIABLE CPACK_COMMAND_RESULT WORKING_DIRECTORY "@CMAKE_INSTALL_PREFIX@/.." )
|
||||
if(CPACK_COMMAND_RESULT)
|
||||
message(FATAL_ERROR "Failed to create AppImage package with this command : '@CMAKE_CURRENT_SOURCE_DIR@/../../tools/create_appimage.sh @EXECUTABLE_NAME@ @QT_PATH@ @APP_PROJECT_VERSION@' at @CMAKE_INSTALL_PREFIX@/..\nMaybe the .appimage already exists and is running. Please remove the file before packaging if it is the case.")
|
||||
message(FATAL_ERROR "Failed to create AppImage package with this command : '@CMAKE_CURRENT_SOURCE_DIR@/../../tools/create_appimage.sh @EXECUTABLE_NAME@ @QT_PATH@ @LINPHONEAPP_VERSION@' at @CMAKE_INSTALL_PREFIX@/..\nMaybe the .appimage already exists and is running. Please remove the file before packaging if it is the case.")
|
||||
endif()
|
||||
endif()
|
||||
if (@PERFORM_SIGNING@)
|
||||
|
|
|
|||
|
|
@ -21,9 +21,13 @@
|
|||
#ifndef VFS_UTILS_H_
|
||||
#define VFS_UTILS_H_
|
||||
|
||||
#include "config.h"
|
||||
#include <QObject>
|
||||
#ifdef QTKEYCHAIN_USE_BUILD_INTERFACE
|
||||
#include <keychain.h>
|
||||
#elif defined(QTKEYCHAIN_TARGET_NAME)
|
||||
#define KEYCHAIN_HEADER <QTKEYCHAIN_TARGET_NAME/keychain.h>
|
||||
#include KEYCHAIN_HEADER
|
||||
#else
|
||||
#include <EQt5Keychain/keychain.h>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,3 +33,5 @@
|
|||
#cmakedefine EXECUTABLE_NAME "${EXECUTABLE_NAME}"
|
||||
#cmakedefine MSPLUGINS_DIR "${MSPLUGINS_DIR}"
|
||||
#cmakedefine ENABLE_APP_WEBVIEW "${ENABLE_APP_WEBVIEW}"
|
||||
#cmakedefine QTKEYCHAIN_TARGET_NAME ${QTKEYCHAIN_TARGET_NAME}
|
||||
|
||||
|
|
|
|||
8
linphone-app/tools/sign_package.sh
Normal file
8
linphone-app/tools/sign_package.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
# Arguments :
|
||||
# $1 = Executable Name
|
||||
# $2 = Identity
|
||||
# $3 = Path to recursivly search
|
||||
|
||||
find $3 -name "*" -exec $1 --force --deep --options runtime,library -s "$2" {} \;
|
||||
|
||||
Loading…
Add table
Reference in a new issue