add qtkeychain submodule

This commit is contained in:
Gaelle Braud 2025-05-26 10:08:43 +02:00
parent 7617996dc4
commit af2350cd16
5 changed files with 32 additions and 17 deletions

3
.gitmodules vendored
View file

@ -1,3 +1,6 @@
[submodule "linphone-sdk"] [submodule "linphone-sdk"]
path = external/linphone-sdk path = external/linphone-sdk
url = https://gitlab.linphone.org/BC/public/linphone-sdk.git url = https://gitlab.linphone.org/BC/public/linphone-sdk.git
[submodule "external/qtkeychain"]
path = external/qtkeychain
url = https://github.com/frankosterfeld/qtkeychain.git

View file

@ -185,9 +185,9 @@ add_option(OPTION_LIST ENABLE_SCREENSHARING "Enable screen sharing." ${ENABLE_VI
# QtKeychain # QtKeychain
add_option(OPTION_LIST 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) if(WIN32)
add_cache(OPTION_LIST QTKEYCHAIN_TARGET_NAME "Override Qt5Keychain library name for a workaround with windeployqt" "EQt5Keychain") add_cache(OPTION_LIST QTKEYCHAIN_TARGET_NAME "Override Qt6Keychain library name for a workaround with windeployqt" "EQt6Keychain")
else() else()
add_cache(OPTION_LIST QTKEYCHAIN_TARGET_NAME "Override Qt5Keychain library name" "Qt5Keychain") add_cache(OPTION_LIST QTKEYCHAIN_TARGET_NAME "Override Qt6Keychain library name" "Qt6Keychain")
endif() endif()
if(WIN32) if(WIN32)
add_option(OPTION_LIST ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" YES) add_option(OPTION_LIST ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" YES)
@ -206,7 +206,7 @@ set(ENABLE_CSHARP_WRAPPER OFF CACHE BOOL "Build the CSharp wrapper for Liblinpho
set(ENABLE_THEORA OFF) set(ENABLE_THEORA OFF)
set(ENABLE_QT_GL ${ENABLE_VIDEO}) set(ENABLE_QT_GL ${ENABLE_VIDEO})
find_package(Qt6 REQUIRED COMPONENTS Core) find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
if(NOT Qt6_FOUND) if(NOT Qt6_FOUND)
message(FATAL_ERROR "Minimum supported Qt6!") message(FATAL_ERROR "Minimum supported Qt6!")
@ -232,13 +232,6 @@ if(NOT APPLE OR MONO_ARCH)
add_subdirectory("external") add_subdirectory("external")
endfunction() endfunction()
add_external() add_external()
if(ENABLE_QT_KEYCHAIN)
function(add_linphone_keychain)
#add_subdirectory("external/qtkeychain")
endfunction()
add_linphone_keychain()
endif()
endif() endif()
function(add_linphone_app) function(add_linphone_app)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # Prevent project from overriding the options we just set here set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # Prevent project from overriding the options we just set here
@ -270,4 +263,16 @@ else()
include(cmake/TasksMacos.cmake) include(cmake/TasksMacos.cmake)
endif() endif()
if (ENABLE_QT_KEYCHAIN)
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${PROJECT_SOURCE_DIR}/external/qtkeychain)
target_link_libraries(${TARGET_NAME} PUBLIC ${QTKEYCHAIN_TARGET_NAME})
message(STATUS "link libraries: ${TARGET_NAME} ${QTKEYCHAIN_TARGET_NAME}")
endif()
message(STATUS "CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}")
message(STATUS "PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}")
message(STATUS "Contents of qtkeychain:")
file(GLOB QTKEYCHAIN_HEADERS "${PROJECT_SOURCE_DIR}/external/qtkeychain/qtkeychain/*.h")
message(STATUS "Found headers: ${QTKEYCHAIN_HEADERS}")
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/hook/pre-commit" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/") file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/cmake/hook/pre-commit" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/")

View file

@ -19,7 +19,7 @@ endforeach()
set(TARGET_NAME Linphone) set(TARGET_NAME Linphone)
set(APP_TARGETS ${LinphoneCxx_TARGET} set(APP_TARGETS ${LinphoneCxx_TARGET}
${Mediastreamer2_TARGET}#MediastreamerUtils ${Mediastreamer2_TARGET}#MediastreamerUtils
${LibLinphone_TARGET})#MediastreamerUtils ${LibLinphone_TARGET})#Liblinphone
set(QT_DEFAULT_MAJOR_VERSION 6) set(QT_DEFAULT_MAJOR_VERSION 6)
set(QT_PACKAGES Core Quick Qml Widgets Svg Multimedia Test NetworkAuth Concurrent)# Search Core at first for initialize Qt scripts for next find_packages. set(QT_PACKAGES Core Quick Qml Widgets Svg Multimedia Test NetworkAuth Concurrent)# Search Core at first for initialize Qt scripts for next find_packages.

View file

@ -1,2 +1,8 @@
add_subdirectory(linphone-sdk/) add_subdirectory(linphone-sdk/)
if(ENABLE_QT_KEYCHAIN)
function(add_linphone_keychain)
add_subdirectory(qtkeychain/)
endfunction()
add_linphone_keychain()
endif()

1
external/qtkeychain vendored Submodule

@ -0,0 +1 @@
Subproject commit 35c4f40186a6ac3260982256e846bb0774ea91de