Commit c3d44a10 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Improve CMake package config and find_package scripts.

parent 3b9b274b
master compat/ios_app_5_3 deleteme feature/AEC3 feature/account_manager_services_devices_list feature/allow-raw-mwi-notification feature/audio-conference-package feature/basic_auth feature/lime_status_by_uri feature/load-static-ms2-plugins feature/media_encryption_settings_on_account feature/medialess feature/screensharing_clean feature/screensharing_packet_router feature/screensharing_signalling feature/swift_push_unit_tests feature/test-new-ccmp-deployment feature/to-delete-compile-last-wrapper fix/ECC-for-desktop fix/android_window fix/audio_routes fix/audio_video_conference_factory_crash fix/auth_info_finding fix/broadcast_flexisip fix/call_history_after_core_stop fix/chat_lesage_local_address_no_contact fix/conf_unschedule_video fix/conference_called_after_joining_5_3 fix/conference_with_all_listeners fix/copy_message_id_content_operator fix/crash_terminate fix/database fix/db_friend_list_fix fix/didUpdatePushCredentials_debug_investigation fix/doc_upload fix/encrypted_chat_subscription_failed fix/flexisip-tester-2.3 fix/force_shared_lib_python_wrapper fix/gcc_14 fix/import-from-legacy-db fix/ios_destroy_platform_helper_on_core_stop fix/ios_foreground_push_incoming_received fix/ios_reactions_notif fix/ios_shared_core_reactions fix/itc-misuse fix/jvm_cpp_wrapper_on_android fix/message_not_sent_rework fix/no-longer-use-deprecated-findpythoninterp-cmake-module fix/paused_by_remote_no_rtp_timeout_master fix/pdb_5_3 fix/plugin_timeout fix/python_build_macos fix/python_const_build_warning fix/qt_crash fix/rtt_message fix/screen_jul fix/srtp_key_length fix/startup_restart fix/stream-deletion fix/stream_allocation_no_label fix/subject_not_changed fix/switch_data_sync_to_short_service fix/tone-indications fix/transfer_state fix/unsubscribe_upon_core_stop fix/update-check fix/uuid4-generation fix/webrtc-ice fix/window_build_dec24 fix/workaround_for_sip_simple_messages_with_bad_to_header hotfix/lime-db-path release/5.3 release/5.4 test/ansible test/call_no_routes test/flexisip-release-candidate-2-4 test/flexisip_b2bua_h264 test/lime_double_digest_auth_challenge 5.5.0-alpha 5.4.4 5.4.3 5.4.2 5.4.1 5.4.0 5.4.0-beta 5.4.0-alpha 5.3.107 5.3.106 5.3.105 5.3.104 5.3.103 5.3.102 5.3.101 5.3.100 5.3.99 5.3.97 5.3.96 5.3.95 5.3.94 5.3.93 5.3.92 5.3.91 5.3.90 5.3.89 5.3.88 5.3.87 5.3.86 5.3.85 5.3.84 5.3.83 5.3.81 5.3.79 5.3.78 5.3.77 5.3.76 5.3.75 5.3.74 5.3.73 5.3.72 5.3.71 5.3.70 5.3.69 5.3.68 5.3.67 5.3.66 5.3.65 5.3.64 5.3.63 5.3.62 5.3.61 5.3.60 5.3.59 5.3.58 5.3.57 5.3.56 5.3.55 5.3.54 5.3.53 5.3.52 5.3.51 5.3.50 5.3.49 5.3.48 5.3.46 5.3.45 5.3.44 5.3.43 5.3.42 5.3.41 5.3.40 5.3.39 5.3.38 5.3.37 5.3.36 5.3.35 5.3.34 5.3.33 5.3.32 5.3.30 5.3.29 5.3.28 5.3.27 5.3.26 5.3.25 5.3.24 5.3.23 5.3.22 5.3.21 5.3.19 5.3.18 5.3.17 5.3.16 5.3.15 5.3.14 5.3.13 5.3.12 5.3.11 5.3.10 5.3.9 5.3.8 5.3.7 5.3.6 5.3.5 5.3.4 5.3.3 5.3.2 5.3.1 5.3.0 5.3.0-beta
1 merge request!2567Improve CMake package config and find_package scripts.
Pipeline #64652 failed with stage
in 7 seconds
Showing with 302 additions and 953 deletions
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
cmake_minimum_required(VERSION 3.22) cmake_minimum_required(VERSION 3.22)
project(linphone VERSION 5.3.0 LANGUAGES C CXX) project(LibLinphone VERSION 5.3.0 LANGUAGES C CXX)
set(LINPHONE_MAJOR_VERSION ${PROJECT_VERSION_MAJOR}) set(LINPHONE_MAJOR_VERSION ${PROJECT_VERSION_MAJOR})
...@@ -66,15 +66,12 @@ option(ENABLE_UNIT_TESTS "Enable compilation of unit tests." YES) ...@@ -66,15 +66,12 @@ option(ENABLE_UNIT_TESTS "Enable compilation of unit tests." YES)
option(ENABLE_VCARD "Turn on compilation of vcard4 support." YES) option(ENABLE_VCARD "Turn on compilation of vcard4 support." YES)
option(ENABLE_VIDEO "Build with video support." YES) option(ENABLE_VIDEO "Build with video support." YES)
option(ENABLE_ASSETS "Package sound assets." YES) option(ENABLE_ASSETS "Package sound assets." YES)
option(ENABLE_PACKAGE_SOURCE "Create 'package_source' target for source archive making (CMake >= 3.11)" OFF) option(ENABLE_PACKAGE_SOURCE "Create 'package_source' target for source archive making" OFF)
option(ENABLE_SQLITE "Build with sqlite support" YES) option(ENABLE_SQLITE "Build with sqlite support" YES)
option(ENABLE_XML2 "Build with libxml2 support - for presence feature mainly" YES) option(ENABLE_XML2 "Build with libxml2 support - for presence feature mainly" YES)
option(ENABLE_EXAMPLE_PLUGIN "Enable build of the example plugin" NO) option(ENABLE_EXAMPLE_PLUGIN "Enable build of the example plugin" NO)
option(ENABLE_EKT_SERVER_PLUGIN "Enable build of the EKT encryption plugin" NO) option(ENABLE_EKT_SERVER_PLUGIN "Enable build of the EKT encryption plugin" NO)
cmake_dependent_option(ENABLE_NOTIFY "Enable libnotify support." YES "ENABLE_GTK_UI;NOT APPLE" NO)
cmake_dependent_option(ENABLE_ASSISTANT "Turn on assistant compiling." YES "ENABLE_GTK_UI" NO)
option(ENABLE_SRTP "Build with the SRTP transport support." YES) option(ENABLE_SRTP "Build with the SRTP transport support." YES)
cmake_dependent_option(ENABLE_ZRTP "Build with ZRTP support." YES "ENABLE_SRTP" NO) cmake_dependent_option(ENABLE_ZRTP "Build with ZRTP support." YES "ENABLE_SRTP" NO)
cmake_dependent_option(ENABLE_GOCLEAR "Build with ZRTP GoClear message support (RFC 6189 - section 5.11)." YES "ENABLE_ZRTP" NO) cmake_dependent_option(ENABLE_GOCLEAR "Build with ZRTP GoClear message support (RFC 6189 - section 5.11)." YES "ENABLE_ZRTP" NO)
...@@ -92,11 +89,8 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") ...@@ -92,11 +89,8 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
endif() endif()
set(LINPHONE_LIBS_FOR_TOOLS liblinphone) set(LINPHONE_LIBS_FOR_TOOLS liblinphone)
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND LINPHONE_LIBS_FOR_TOOLS "Ws2_32" "Iphlpapi" "user32")
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
include(CheckSymbolExists) include(CheckSymbolExists)
include(CheckLibraryExists) include(CheckLibraryExists)
...@@ -116,43 +110,18 @@ endif() ...@@ -116,43 +110,18 @@ endif()
# find_package should be invoked here to check for libraries - however do NOT # find_package should be invoked here to check for libraries - however do NOT
# call include_directories here (see below) # call include_directories here (see below)
if(ENABLE_VCARD) if(ENABLE_VCARD)
find_package(Belcard) find_package(BelCard 5.3.0 REQUIRED)
if(NOT BELCARD_FOUND)
find_package(belcard CONFIG REQUIRED)
endif()
add_definitions(-DVCARD_ENABLED) add_definitions(-DVCARD_ENABLED)
endif() endif()
find_package(BelleSIP) find_package(BelleSIP 5.3.0 REQUIRED)
if(NOT BELLESIP_FOUND) find_package(Mediastreamer2 5.3.0 REQUIRED)
find_package(BelleSIP CONFIG REQUIRED) find_package(Ortp 5.3.0 REQUIRED)
endif() find_package(BCToolbox 5.3.0 REQUIRED OPTIONAL_COMPONENTS tester)
find_package(Mediastreamer2) find_package(Belr 5.3.0 REQUIRED)
if(NOT MEDIASTREAMER2_FOUND)
find_package(Mediastreamer2 CONFIG REQUIRED)
endif()
find_package(Ortp)
if(NOT ORTP_FOUND)
find_package(ortp CONFIG REQUIRED)
endif()
find_package(BcToolbox)
if(NOT BCTOOLBOX_FOUND)
find_package(bctoolbox 0.0.3 CONFIG REQUIRED OPTIONAL_COMPONENTS tester)
endif()
find_package(Belr)
if(NOT BELR_FOUND)
find_package(belr CONFIG REQUIRED)
endif()
if(ENABLE_ADVANCED_IM) if(ENABLE_ADVANCED_IM)
find_package(IntegratedXercesC) bc_find_package(XercesC XercesC::XercesC xerces-c REQUIRED)
if(INTEGRATEDXERCESC_FOUND)
set(XercesC_FOUND 1)
set(XercesC_TARGET "xerces-c")
else()
find_package(XercesC REQUIRED)
set(XercesC_TARGET "XercesC::XercesC")
endif()
set(HAVE_ADVANCED_IM 1) set(HAVE_ADVANCED_IM 1)
set(LIBXSD_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/libxsd") set(LIBXSD_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/libxsd")
endif() endif()
...@@ -169,18 +138,18 @@ if(ENABLE_ZRTP) ...@@ -169,18 +138,18 @@ if(ENABLE_ZRTP)
endif() endif()
if(ENABLE_SQLITE) if(ENABLE_SQLITE)
find_package(Sqlite3 REQUIRED) bc_find_package(SQLite3 SQLite::SQLite3 sqlite3 REQUIRED)
add_definitions(-DHAVE_SQLITE) add_definitions(-DHAVE_SQLITE)
endif() endif()
if(ENABLE_XML2) if(ENABLE_XML2)
find_package(XML2 REQUIRED) bc_find_package(LibXml2 LibXml2::LibXml2 xml2 REQUIRED)
add_definitions(-DHAVE_XML2) add_definitions(-DHAVE_XML2)
endif() endif()
if(ENABLE_DB_STORAGE) if(ENABLE_DB_STORAGE)
# APPLE platform does not use dlopen for soci backend # APPLE platform does not use dlopen for soci backend
if (APPLE OR ANDROID) if(APPLE OR ANDROID)
find_package(Soci REQUIRED COMPONENTS sqlite3) find_package(Soci REQUIRED COMPONENTS sqlite3)
else() else()
find_package(Soci REQUIRED) find_package(Soci REQUIRED)
...@@ -188,38 +157,21 @@ if(ENABLE_DB_STORAGE) ...@@ -188,38 +157,21 @@ if(ENABLE_DB_STORAGE)
set(HAVE_DB_STORAGE 1) set(HAVE_DB_STORAGE 1)
endif() endif()
find_package(IntegratedZLIB) bc_find_package(ZLIB ZLIB::ZLIB zlib)
if(INTEGRATEDZLIB_FOUND) if(ZLIB_FOUND)
set(ZLIB_FOUND 1) set(HAVE_ZLIB 1)
else()
find_package(ZLIB)
endif() endif()
if(ENABLE_TUNNEL) if(ENABLE_TUNNEL)
find_package(Tunnel) find_package(Tunnel 0.7.0)
if(NOT TUNNEL_FOUND) if(NOT Tunnel_FOUND)
message(WARNING "Could not find the tunnel library!") message(WARNING "Could not find the tunnel library!")
set(ENABLE_TUNNEL OFF CACHE BOOL "Enable tunnel support." FORCE) set(ENABLE_TUNNEL OFF CACHE BOOL "Enable tunnel support." FORCE)
endif() endif()
endif() endif()
if(ENABLE_NOTIFY)
find_package(Notify)
if(NOTIFY_FOUND)
set(HAVE_NOTIFY4 1)
else()
message(WARNING "Could not find the notify library!")
set(ENABLE_NOTIFY OFF CACHE BOOL "Enable libnotify support." FORCE)
endif()
endif()
if(ENABLE_ASSISTANT)
set(BUILD_WIZARD 1)
endif()
if(ENABLE_LIME_X3DH) if(ENABLE_LIME_X3DH)
find_package(BZRTP) find_package(BZRTP 5.3.0 REQUIRED)
if(NOT BZRTP_FOUND) find_package(Lime 5.3.0 REQUIRED)
find_package(BZRTP REQUIRED CONFIG)
endif()
bc_find_package(lime REQUIRED CONFIG)
set(HAVE_LIME_X3DH 1) set(HAVE_LIME_X3DH 1)
endif() endif()
if(ENABLE_CXX_WRAPPER OR ENABLE_CSHARP_WRAPPER OR ENABLE_JAVA_WRAPPER OR ENABLE_SWIFT_WRAPPER OR ENABLE_DOC) if(ENABLE_CXX_WRAPPER OR ENABLE_CSHARP_WRAPPER OR ENABLE_JAVA_WRAPPER OR ENABLE_SWIFT_WRAPPER OR ENABLE_DOC)
...@@ -235,17 +187,14 @@ if(ENABLE_LDAP) ...@@ -235,17 +187,14 @@ if(ENABLE_LDAP)
endif() endif()
if(ENABLE_FLEXIAPI) if(ENABLE_FLEXIAPI)
find_package(JsonCPP) find_package(JsonCPP REQUIRED)
if(NOT JSONCPP_FOUND)
find_package(jsoncpp REQUIRED)
endif()
set(HAVE_FLEXIAPI TRUE) set(HAVE_FLEXIAPI TRUE)
endif() endif()
if(ENABLE_QRCODE) if(ENABLE_QRCODE)
find_package(ZXing REQUIRED) find_package(ZXing REQUIRED)
add_definitions(-DQRCODE_ENABLED) add_definitions(-DQRCODE_ENABLED)
if(ENABLE_JPEG)# only needed for QRCode. Move from it for other if(ENABLE_JPEG) # Only needed for QRCode. Move from it for other
add_definitions(-DJPEG_ENABLED) add_definitions(-DJPEG_ENABLED)
find_package(TurboJpeg REQUIRED) find_package(TurboJpeg REQUIRED)
endif() endif()
...@@ -268,8 +217,6 @@ if(ANDROID) ...@@ -268,8 +217,6 @@ if(ANDROID)
endif() endif()
endif() endif()
set(LINPHONE_LDFLAGS "${BELLESIP_LDFLAGS} ${MEDIASTREAMER2_LDFLAGS}")
# include_directories must be called only UNDER THIS LINE in order to use our # include_directories must be called only UNDER THIS LINE in order to use our
# projects submodules first (we do NOT want to have system headers in first position) # projects submodules first (we do NOT want to have system headers in first position)
include_directories( include_directories(
...@@ -280,51 +227,18 @@ include_directories( ...@@ -280,51 +227,18 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}/coreapi/ ${CMAKE_CURRENT_BINARY_DIR}/coreapi/
) )
set(LINPHONE_INCLUDE_DIRS set(LINPHONE_INCLUDE_DIRS
${BELLESIP_INCLUDE_DIRS}
${MEDIASTREAMER2_INCLUDE_DIRS}
${BCTOOLBOX_CORE_INCLUDE_DIRS}
${BELR_INCLUDE_DIRS}
${LIBXSD_INCLUDE_DIRS} ${LIBXSD_INCLUDE_DIRS}
${XercesC_INCLUDE_DIRS}
) )
if(ANDROID) if(ANDROID)
include_directories(${CMAKE_CURRENT_BINARY_DIR}/java) include_directories(${CMAKE_CURRENT_BINARY_DIR}/java)
endif() endif()
if(ENABLE_TUNNEL)
list(APPEND LINPHONE_INCLUDE_DIRS ${TUNNEL_INCLUDE_DIRS})
endif()
if(ENABLE_XML2) if(ZXing_FOUND AND ZXing_USE_BUILD_INTERFACE)
list(APPEND LINPHONE_INCLUDE_DIRS ${XML2_INCLUDE_DIRS}) add_compile_definitions("ZXING_USE_BUILD_INTERFACE")
endif() endif()
if(ENABLE_SQLITE) set(LINPHONE_CPPFLAGS )
list(APPEND LINPHONE_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIRS})
endif()
if(ZLIB_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
set(HAVE_ZLIB 1)
endif()
if(INTL_FOUND)
set(HAVE_INTL 1)
list(APPEND LINPHONE_INCLUDE_DIRS ${INTL_INCLUDE_DIRS})
endif()
if(OPENLDAP_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${OPENLDAP_INCLUDE_DIRS})
endif()
if(ZXING_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${ZXING_INCLUDE_DIRS})
if(ZXING_USE_BUILD_INTERFACE)
add_compile_definitions("ZXING_USE_BUILD_INTERFACE")
endif()
endif()
if(TURBOJPEG_FOUND)
list(APPEND LINPHONE_INCLUDE_DIRS ${TURBOJPEG_INCLUDE_DIRS})
endif()
set(LINPHONE_CPPFLAGS ${BELCARD_CPPFLAGS} ${BELLESIP_CPPFLAGS} ${MEDIASTREAMER2_CPPFLAGS} ${BCTOOLBOX_CPPFLAGS} ${BELR_CPPFLAGS})
if(NOT BUILD_SHARED_LIBS) if(NOT BUILD_SHARED_LIBS)
list(APPEND LINPHONE_CPPFLAGS "-DLINPHONE_STATIC") list(APPEND LINPHONE_CPPFLAGS "-DLINPHONE_STATIC")
endif() endif()
...@@ -425,28 +339,28 @@ set(PACKAGE_FREEDESKTOP_DIR "${PACKAGE_DATA_DIR}/applications") ...@@ -425,28 +339,28 @@ set(PACKAGE_FREEDESKTOP_DIR "${PACKAGE_DATA_DIR}/applications")
set(LINPHONE_FRAMEWORK_VERSION "A") set(LINPHONE_FRAMEWORK_VERSION "A")
if(APPLE AND NOT IOS) if(APPLE AND NOT IOS)
set(LINPHONE_PLUGINS_LOCATION "Frameworks/linphone.framework/Versions/${LINPHONE_FRAMEWORK_VERSION}/Libraries") set(LIBLINPHONE_PLUGINS_DIR "Frameworks/linphone.framework/Versions/${LINPHONE_FRAMEWORK_VERSION}/Libraries")
install(DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${LINPHONE_PLUGINS_LOCATION}")
if (NOT EXISTS "${CMAKE_INSTALL_PREFIX}/Frameworks/linphone.framework/Libraries") if (NOT EXISTS "${CMAKE_INSTALL_PREFIX}/Frameworks/linphone.framework/Libraries")
install(CODE "execute_process(COMMAND sh -c \"ln -sf Versions/Current/Libraries ${CMAKE_INSTALL_PREFIX}/Frameworks/linphone.framework/Libraries\")") install(CODE "execute_process(COMMAND sh -c \"ln -sf Versions/Current/Libraries ${CMAKE_INSTALL_PREFIX}/Frameworks/linphone.framework/Libraries\")")
endif() endif()
else() else()
set(LINPHONE_PLUGINS_LOCATION "${CMAKE_INSTALL_LIBDIR}/liblinphone/plugins") set(LIBLINPHONE_PLUGINS_DIR "${CMAKE_INSTALL_LIBDIR}/liblinphone/plugins")
endif() endif()
define_property(TARGET PROPERTY "LIBLINPHONE_PLUGINS_DIR" BRIEF_DOCS "Stores the location of liblinphone plugins" FULL_DOCS "Stores the location of liblinphone plugins")
install(DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${LIBLINPHONE_PLUGINS_DIR}")
if(ENABLE_RELATIVE_PREFIX) if(ENABLE_RELATIVE_PREFIX)
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") if(CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(LINPHONE_PACKAGE_PLUGINS_DIR "." CACHE STRING "Folder where plugins loaded by liblinphone must be stored") set(LINPHONE_PACKAGE_PLUGINS_DIR "." CACHE STRING "Folder where plugins loaded by liblinphone must be stored")
else() else()
set(LINPHONE_PACKAGE_PLUGINS_DIR "./${LINPHONE_PLUGINS_LOCATION}" CACHE STRING "Folder where plugins loaded by liblinphone must be stored") set(LINPHONE_PACKAGE_PLUGINS_DIR "./${LINPHONE_PLUGINS_DIR}" CACHE STRING "Folder where plugins loaded by liblinphone must be stored")
endif() endif()
else() else()
set(LINPHONE_PACKAGE_PLUGINS_DIR "${CMAKE_INSTALL_PREFIX}/${LINPHONE_PLUGINS_LOCATION}" CACHE STRING "Folder where plugins loaded by liblinphone must be stored") set(LINPHONE_PACKAGE_PLUGINS_DIR "${CMAKE_INSTALL_PREFIX}/${LINPHONE_PLUGINS_DIR}" CACHE STRING "Folder where plugins loaded by liblinphone must be stored")
endif() endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake" "${CMAKE_CURRENT_BINARY_DIR}/config.h")
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/config.h PROPERTIES GENERATED ON) set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/config.h" PROPERTIES GENERATED ON)
add_definitions(-DHAVE_CONFIG_H) add_definitions(-DHAVE_CONFIG_H)
if(ENABLE_VIDEO) if(ENABLE_VIDEO)
...@@ -469,8 +383,6 @@ if(ENABLE_EKT_SERVER_PLUGIN) ...@@ -469,8 +383,6 @@ if(ENABLE_EKT_SERVER_PLUGIN)
add_definitions(-DHAVE_EKT_SERVER_PLUGIN) add_definitions(-DHAVE_EKT_SERVER_PLUGIN)
endif() endif()
set(EXPORT_TARGETS_NAME "Linphone")
add_subdirectory(include) add_subdirectory(include)
if(ENABLE_JAVA_WRAPPER) if(ENABLE_JAVA_WRAPPER)
add_subdirectory(wrappers/java) add_subdirectory(wrappers/java)
...@@ -505,27 +417,37 @@ if(ENABLE_UNIT_TESTS) ...@@ -505,27 +417,37 @@ if(ENABLE_UNIT_TESTS)
endif() endif()
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
set(CONFIG_PACKAGE_LOCATION "${CMAKE_INSTALL_DATADIR}/Linphone/cmake") set(CMAKE_MODULES_INSTALL_DIR "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/cmake")
configure_package_config_file("cmake/${PROJECT_NAME}Config.cmake.in" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
write_basic_package_version_file( INSTALL_DESTINATION "${CMAKE_MODULES_INSTALL_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}/LinphoneConfigVersion.cmake" PATH_VARS LIBLINPHONE_PLUGINS_DIR
VERSION ${LINPHONE_VERSION} )
write_basic_package_version_file("${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion COMPATIBILITY AnyNewerVersion
) )
configure_package_config_file(cmake/LinphoneConfig.cmake.in install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/LinphoneConfig.cmake" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION ${CONFIG_PACKAGE_LOCATION} "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
NO_SET_AND_CHECK_MACRO DESTINATION ${CMAKE_MODULES_INSTALL_DIR}
) )
install(EXPORT ${EXPORT_TARGETS_NAME}Targets if(Soci_FOUND)
FILE LinphoneTargets.cmake install(FILES "cmake/FindSoci.cmake" DESTINATION ${CMAKE_MODULES_INSTALL_DIR})
DESTINATION ${CONFIG_PACKAGE_LOCATION} endif()
) if(OpenLDAP_FOUND)
install(FILES install(FILES "cmake/FindOpenLDAP.cmake" DESTINATION ${CMAKE_MODULES_INSTALL_DIR})
"${CMAKE_CURRENT_BINARY_DIR}/LinphoneConfig.cmake" endif()
"${CMAKE_CURRENT_BINARY_DIR}/LinphoneConfigVersion.cmake" if(ZXing_FOUND)
DESTINATION ${CONFIG_PACKAGE_LOCATION} install(FILES "cmake/FindZXing.cmake" DESTINATION ${CMAKE_MODULES_INSTALL_DIR})
endif()
if(TurboJpeg_FOUND)
install(FILES "cmake/FindTurboJpeg.cmake" DESTINATION ${CMAKE_MODULES_INSTALL_DIR})
endif()
install(EXPORT ${PROJECT_NAME}Targets
FILE "${PROJECT_NAME}Targets.cmake"
DESTINATION ${CMAKE_MODULES_INSTALL_DIR}
) )
if (ENABLE_PACKAGE_SOURCE) if (ENABLE_PACKAGE_SOURCE)
......
...@@ -61,7 +61,7 @@ Here the main dependencies listed: ...@@ -61,7 +61,7 @@ Here the main dependencies listed:
* **`ENABLE_UNIT_TESTS=NO`** : do not build testing binaries * **`ENABLE_UNIT_TESTS=NO`** : do not build testing binaries
* **`ENABLE_VCARD=NO`** : disable VCard4 support * **`ENABLE_VCARD=NO`** : disable VCard4 support
* **`ENABLE_TOOLS=NO`** : do not build tool binaries * **`ENABLE_TOOLS=NO`** : do not build tool binaries
* **`ENABLE_LIME=NO`** : disable Linphone Instant Messaging Encryption * **`ENABLE_LIME_X3DH=NO`** : disable Linphone Instant Messaging Encryption
## Note for packagers ## Note for packagers
......
############################################################################ ############################################################################
# CMakeLists.txt # CMakeLists.txt
# Copyright (c) 2010-2022 Belledonne Communications SARL. # Copyright (c) 2010-2023 Belledonne Communications SARL.
# #
############################################################################ ############################################################################
# #
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
############################################################################ ############################################################################
cmake_minimum_required(VERSION 3.11) # we need CMake 3.11 for defining 'package_source' target as custom target
if(NOT CPACK_PACKAGE_NAME) if(NOT CPACK_PACKAGE_NAME)
set(CPACK_PACKAGE_NAME "liblinphone") set(CPACK_PACKAGE_NAME "liblinphone")
endif() endif()
......
############################################################################
# FindBZRTP.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 bzrtp include files and library
#
# BZRTP_FOUND - system has lib bzrtp
# BZRTP_INCLUDE_DIRS - the bzrtp include directory
# BZRTP_LIBRARIES - The library needed to use bzrtp
if(TARGET bzrtp)
set(BZRTP_LIBRARIES bzrtp)
get_target_property(BZRTP_INCLUDE_DIRS bzrtp INTERFACE_INCLUDE_DIRECTORIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(BZRTP
DEFAULT_MSG
BZRTP_INCLUDE_DIRS BZRTP_LIBRARIES
)
mark_as_advanced(BZRTP_INCLUDE_DIRS BZRTP_LIBRARIES)
endif()
############################################################################
# FindBctoolbox.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 bctoolbox include files and library
#
# 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
if(TARGET bctoolbox)
set(BCTOOLBOX_CORE_LIBRARIES bctoolbox)
get_target_property(BCTOOLBOX_CORE_INCLUDE_DIRS bctoolbox INTERFACE_INCLUDE_DIRECTORIES)
set(BCTOOLBOX_CORE_FOUND TRUE)
get_target_property(BCTOOLBOX_SOURCE_DIR bctoolbox SOURCE_DIR)
set(BCTOOLBOX_CMAKE_DIR "${BCTOOLBOX_SOURCE_DIR}/../cmake")
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()
############################################################################
# FindBelcard.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
#
# BELCARD_FOUND - system has lib belcard
# BELCARD_INCLUDE_DIRS - the belcard include directory
# BELCARD_LIBRARIES - The library needed to use belcard
if(TARGET 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)
endif()
############################################################################
# FindBelleSIP.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 bellesip include files and library
#
# BELLESIP_FOUND - system has lib bellesip
# BELLESIP_INCLUDE_DIRS - the bellesip include directory
# BELLESIP_LIBRARIES - The library needed to use bellesip
# BELLESIP_TARGETNAME - The target name for the bellesip library
if(TARGET belle-sip)
set(BELLESIP_LIBRARIES belle-sip)
set(BELLESIP_TARGETNAME 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()
############################################################################
# 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 belr include files and library
#
# BELR_FOUND - system has lib belr
# BELR_INCLUDE_DIRS - the belr include directory
# BELR_LIBRARIES - The library needed to use belr
if(TARGET 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()
############################################################################
# FindCpuFeatures.cmake
# Copyright (C) 2017-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 Android cpufeatures include file and library
#
# CPUFEATURES_FOUND - system has libcpufeatures
# CPUFEATURES_INCLUDE_DIRS - The libcpufeatures include directory
# CPUFEATURES_LIBRARIES - The libraries needed to use libcpufeatures
if(TARGET cpufeatures)
set(CPUFEATURES_LIBRARIES cpufeatures)
get_target_property(CPUFEATURES_INCLUDE_DIRS cpufeatures INTERFACE_INCLUDE_DIRECTORIES)
else()
find_library(CPUFEATURES_LIBRARIES
NAMES cpufeatures
)
find_path(CPUFEATURES_INCLUDE_DIRS
NAMES cpu-features.h
PATH_SUFFIXES include
)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CpuFeatures
DEFAULT_MSG
CPUFEATURES_INCLUDE_DIRS
CPUFEATURES_LIBRARIES
)
mark_as_advanced(CPUFEATURES_INCLUDE_DIRS CPUFEATURES_LIBRARIES)
############################################################################
# FindIconv.cmake
# Copyright (C) 2014 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 iconv include file and library
#
# ICONV_FOUND - system has libiconv
# ICONV_INCLUDE_DIRS - the libiconv include directory
# ICONV_LIBRARIES - The libraries needed to use libiconv
if(APPLE AND NOT IOS)
set(ICONV_HINTS "${CMAKE_OSX_SYSROOT}/usr" "/usr")
endif()
if(ICONV_HINTS)
set(ICONV_LIBRARIES_HINTS "${ICONV_HINTS}/lib")
endif()
find_path(ICONV_INCLUDE_DIRS
NAMES iconv.h
HINTS "${ICONV_HINTS}"
PATH_SUFFIXES include
)
if(ICONV_INCLUDE_DIRS)
set(HAVE_ICONV_H 1)
endif()
find_library(ICONV_LIBRARIES
NAMES iconv
HINTS "${ICONV_LIBRARIES_HINTS}"
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Iconv
DEFAULT_MSG
ICONV_INCLUDE_DIRS ICONV_LIBRARIES HAVE_ICONV_H
)
mark_as_advanced(ICONV_INCLUDE_DIRS ICONV_LIBRARIES HAVE_ICONV_H)
############################################################################
# FindIntegratedXercesC.txt
# 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 xercesc include file and library
#
# XercesC_FOUND - system has xercesc
# XercesC_INCLUDE_DIRS - the xercesc include directory
# XercesC_LIBRARIES - The libraries needed to use xercesc
if(TARGET xerces-c)
set(XercesC_LIBRARIES xerces-c)
get_target_property(XercesC_INCLUDE_DIRS xerces-c INTERFACE_INCLUDE_DIRECTORIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(IntegratedXercesC
DEFAULT_MSG
XercesC_INCLUDE_DIRS XercesC_LIBRARIES
)
mark_as_advanced(XercesC_INCLUDE_DIRS XercesC_LIBRARIES)
endif()
############################################################################
# FindIntegratedZLIB.txt
# 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 zlib include file and library
#
# ZLIB_FOUND - system has zlib
# ZLIB_INCLUDE_DIRS - the zlib include directory
# ZLIB_LIBRARIES - The libraries needed to use zlib
if(TARGET zlib)
set(ZLIB_LIBRARIES zlib)
get_target_property(ZLIB_INCLUDE_DIRS zlib INTERFACE_INCLUDE_DIRECTORIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(IntegratedZLIB
DEFAULT_MSG
ZLIB_INCLUDE_DIRS ZLIB_LIBRARIES
)
mark_as_advanced(ZLIB_INCLUDE_DIRS ZLIB_LIBRARIES)
endif()
...@@ -20,29 +20,64 @@ ...@@ -20,29 +20,64 @@
# #
############################################################################ ############################################################################
# #
# - Find the jsoncpp include files and library # Find the jsoncpp library.
# #
# JSONCPP_FOUND - system has lib jsoncpp # Targets
# JSONCPP_INCLUDE_DIRS - the jsoncpp include directory # ^^^^^^^
# JSONCPP_LIBRARIES - The library needed to use jsoncpp #
# The following targets may be defined:
#
# jsoncpp_lib - If the jsoncpp library has been found and is a shared lib
# jsoncpp_static - If the jsoncpp library has been found and is a static lib
#
#
# Result variables
# ^^^^^^^^^^^^^^^^
#
# This module will set the following variables in your project:
#
# JsonCPP_FOUND - The jsoncpp library has been found
# JsonCPP_TARGET - The name of the CMake target for the jsoncpp library
if(TARGET jsoncpp_lib OR TARGET jsoncpp_static) if(TARGET jsoncpp_lib OR TARGET jsoncpp_static)
if(TARGET jsoncpp_lib) if(TARGET jsoncpp_lib)
set(JSONCPP_LIBRARIES jsoncpp_lib) set(JsonCPP_TARGET jsoncpp_lib)
get_target_property(JSONCPP_INCLUDE_DIRS jsoncpp_lib INTERFACE_INCLUDE_DIRECTORIES)
else() else()
set(JSONCPP_LIBRARIES jsoncpp_static) set(JsonCPP_TARGET jsoncpp_static)
get_target_property(JSONCPP_INCLUDE_DIRS jsoncpp_static INTERFACE_INCLUDE_DIRECTORIES)
endif() endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(JsonCPP find_package_handle_standard_args(JsonCPP
DEFAULT_MSG DEFAULT_MSG
JSONCPP_INCLUDE_DIRS JSONCPP_LIBRARIES JsonCPP_TARGET
) )
mark_as_advanced(JsonCPP_TARGET)
mark_as_advanced(JSONCPP_INCLUDE_DIRS JSONCPP_LIBRARIES) else()
set(_OPTIONS "CONFIG")
if(JsonCPP_FIND_REQUIRED)
list(APPEND _OPTIONS "REQUIRED")
endif()
if(JsonCPP_FIND_QUIETLY)
list(APPEND _OPTIONS "QUIET")
endif()
if(JsonCPP_FIND_VERSION)
list(PREPEND _OPTIONS "${jsoncpp_FIND_VERSION}")
endif()
if(JsonCPP_FIND_EXACT)
list(APPEND _OPTIONS "EXACT")
endif()
find_package(jsoncpp ${_OPTIONS})
if(TARGET jsoncpp_lib)
set(JsonCPP_TARGET jsoncpp_lib)
else()
set(JsonCPP_TARGET jsoncpp_static)
endif()
endif() endif()
############################################################################
# FindMediastreamer2.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 mediastreamer2 include files and library
#
# 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
if(TARGET 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)
endif()
############################################################################
# FindNotify.cmake
# Copyright (C) 2014 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 notify include file and library
#
# NOTIFY_FOUND - system has libnotify
# NOTIFY_INCLUDE_DIRS - the libnotify include directory
# NOTIFY_LIBRARIES - The libraries needed to use libnotify
set(_NOTIFY_ROOT_PATHS
${CMAKE_INSTALL_PREFIX}
)
find_path(NOTIFY_INCLUDE_DIRS
NAMES libnotify/notify.h
HINTS _NOTIFY_ROOT_PATHS
PATH_SUFFIXES include
)
if(NOTIFY_INCLUDE_DIRS)
set(HAVE_LIBNOTIFY_NOTIFY_H 1)
endif()
find_library(NOTIFY_LIBRARIES
NAMES notify
HINTS ${_NOTIFY_ROOT_PATHS}
PATH_SUFFIXES bin lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Notify
DEFAULT_MSG
NOTIFY_INCLUDE_DIRS NOTIFY_LIBRARIES HAVE_LIBNOTIFY_NOTIFY_H
)
mark_as_advanced(NOTIFY_INCLUDE_DIRS NOTIFY_LIBRARIES HAVE_LIBNOTIFY_NOTIFY_H)
...@@ -18,66 +18,123 @@ ...@@ -18,66 +18,123 @@
# #
############################################################################ ############################################################################
# #
# - Find the OpenLDAP include file and library # Find the openldap library.
# #
# OPENLDAP_FOUND - system has OpenLDAP # Targets
# OPENLDAP_INCLUDE_DIRS - the OpenLDAP include directory # ^^^^^^^
# OPENLDAP_LIBRARIES - The libraries needed to use OpenLDAP #
# The following targets may be defined:
#
# ldap - If the ldap library has been found
# lber - If the lber library has been found
#
#
# Result variables
# ^^^^^^^^^^^^^^^^
#
# This module will set the following variables in your project:
#
# 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) if(TARGET ldap)
set(OPENLDAP_LIBRARIES ldap) set(OpenLDAP_TARGET ldap)
get_target_property(OPENLDAP_INCLUDE_DIRS ldap INTERFACE_INCLUDE_DIRECTORIES) 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() 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. # 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 find_path(_OpenLDAP_INCLUDE_DIRS
NAMES ldap.h NAMES ldap.h
PATH_SUFFIXES include/openldap
HINTS "${CMAKE_INSTALL_PREFIX}" HINTS "${CMAKE_INSTALL_PREFIX}"
PATH_SUFFIXES include/openldap
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_path(OPENLDAP_INCLUDE_DIRS find_path(_OpenLDAP_INCLUDE_DIRS
NAMES ldap.h NAMES ldap.h
PATH_SUFFIXES include/openldap
HINTS "${CMAKE_INSTALL_PREFIX}" HINTS "${CMAKE_INSTALL_PREFIX}"
PATH_SUFFIXES include/openldap
) )
#LDAP find_library(_OpenLDAP_LIBRARY
find_library(LDAP_LIB
NAMES ldap libldap NAMES ldap libldap
HINTS "${CMAKE_INSTALL_PREFIX}" HINTS "${CMAKE_INSTALL_PREFIX}"
PATH_SUFFIXES lib PATH_SUFFIXES lib
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_library(LDAP_LIB find_library(_OpenLDAP_LIBRARY
NAMES ldap libldap NAMES ldap libldap
HINTS "${CMAKE_INSTALL_PREFIX}" HINTS "${CMAKE_INSTALL_PREFIX}"
PATH_SUFFIXES lib PATH_SUFFIXES lib
) )
#LBER find_library(_OpenLDAP_lber_LIBRARY
find_library(LBER_LIB
NAMES lber liblber NAMES lber liblber
HINTS "${CMAKE_INSTALL_PREFIX}" HINTS "${CMAKE_INSTALL_PREFIX}"
PATH_SUFFIXES lib PATH_SUFFIXES lib
NO_DEFAULT_PATH NO_DEFAULT_PATH
) )
find_library(LBER_LIB find_library(_OpenLDAP_lber_LIBRARY
NAMES lber liblber NAMES lber liblber
HINTS "${CMAKE_INSTALL_PREFIX}" HINTS "${CMAKE_INSTALL_PREFIX}"
PATH_SUFFIXES lib 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() endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OpenLDAP find_package_handle_standard_args(OpenLDAP
DEFAULT_MSG REQUIRED_VARS ${_OpenLDAP_REQUIRED_VARS}
OPENLDAP_INCLUDE_DIRS OPENLDAP_LIBRARIES HANDLE_COMPONENTS
) )
mark_as_advanced(${_OpenLDAP_CACHE_VARS})
mark_as_advanced(OPENLDAP_INCLUDE_DIRS OPENLDAP_LIBRARIES)
############################################################################
# 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
#
# ORTP_FOUND - system has lib ortp
# ORTP_INCLUDE_DIRS - the ortp include directory
# ORTP_LIBRARIES - The library needed to use ortp
if(TARGET 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()
############################################################################
# Copyright (c) 2021 Belledonne Communications SARL.
#
# This file is part of liblinphone.
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
#
############################################################################
#
# - Find the Cyrus SASL include file and library
#
# SASL_FOUND - system has OpenLDAP
# SASL_INCLUDE_DIRS - the OpenLDAP include directory
# SASL_LIBRARIES - The libraries needed to use OpenLDAP
find_path(SASL_INCLUDE_DIRS
NAMES sasl/sasl.h
HINTS "${CMAKE_INSTALL_PREFIX}"
PATH_SUFFIXES include
)
find_library(SASL_LIBRARIES
NAMES sasl2
HINTS "${CMAKE_INSTALL_PREFIX}"
PATH_SUFFIXES lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SASL
DEFAULT_MSG
SASL_INCLUDE_DIRS SASL_LIBRARIES
)
mark_as_advanced(SASL_INCLUDE_DIRS SASL_LIBRARIES)
############################################################################### ############################################################################
# CMake module to search for SOCI library # FindSoci.cmake
# Copyright (C) 2023 Belledonne Communications, Grenoble France
# #
# WARNING: This module is experimental work in progress. ############################################################################
# #
# This module defines: # This program is free software; you can redistribute it and/or
# SOCI_INCLUDE_DIRS = include dirs to be used when using the soci library # modify it under the terms of the GNU General Public License
# SOCI_LIBRARIES = full path to the soci library # as published by the Free Software Foundation; either version 2
# SOCI_VERSION = the soci version found (not yet. soci does not provide that info.) # of the License, or (at your option) any later version.
# SOCI_FOUND = true if soci was found
# #
# For each component you specify in find_package(), the following variables are set. # 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.
# #
# SOCI_${COMPONENT}_PLUGIN = full path to the soci plugin # You should have received a copy of the GNU General Public License
# SOCI_${COMPONENT}_FOUND # along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# #
# Copyright (c) 2011 Michael Jansen <info@michael-jansen.biz> ############################################################################
# #
# Redistribution and use is allowed according to the terms of the BSD license. # Find the soci library.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# #
############################################################################### # Targets
# ^^^^^^^
# #
### Global Configuration Section # The following targets may be defined:
# #
SET(_SOCI_ALL_PLUGINS mysql sqlite3) # soci - If the soci library has been found
#
#
# Result variables
# ^^^^^^^^^^^^^^^^
#
# This module will set the following variables in your project:
#
# Soci_FOUND - The soci library has been found
# Soci_TARGET - The name of the CMake target for the soci library
#
# This module may set the following variable:
#
# Soci_mysql_TARGET - The name of the CMake target for the mysql soci plugin
# Soci_odbc_TARGET - The name of the CMake target for the obdc soci plugin
# Soci_postgresql_TARGET - The name of the CMake target for the postgresql soci plugin
# Soci_sqlite3_TARGET - The name of the CMake target for the sqlite3 soci plugin
SET(_SOCI_REQUIRED_VARS SOCI_INCLUDE_DIRS SOCI_LIBRARIES)
SET(_SOCI_VERSION "_4_0") include(FindPackageHandleStandardArgs)
set(_Soci_ALL_PLUGINS mysql odbc postgresql sqlite3)
set(_Soci_REQUIRED_VARS Soci_TARGET)
set(_Soci_CACHE_VARS ${_Soci_REQUIRED_VARS})
set(_Soci_VERSION "_4_0")
if(TARGET soci_core OR TARGET soci_core_static) if(TARGET soci_core OR TARGET soci_core_static)
if(TARGET soci_core) if(TARGET soci_core)
set(SOCI_CORE_TARGET soci_core) set(Soci_TARGET soci_core)
else() else()
set(SOCI_CORE_TARGET soci_core_static) set(Soci_TARGET soci_core_static)
endif() endif()
set(SOCI_LIBRARIES ${SOCI_CORE_TARGET})
get_target_property(SOCI_INCLUDE_DIRS ${SOCI_CORE_TARGET} INTERFACE_INCLUDE_DIRECTORIES)
if(TARGET soci_sqlite3 OR TARGET soci_sqlite3_static) if(TARGET soci_sqlite3 OR TARGET soci_sqlite3_static)
if(TARGET soci_sqlite3) list(APPEND _Soci_REQUIRED_VARS Soci_sqlite3_TARGET)
set(SOCI_SQLITE3_TARGET soci_sqlite3) if(TARGET soci_sqlite3)
else() set(Soci_sqlite3_TARGET soci_sqlite3)
set(SOCI_SQLITE3_TARGET soci_sqlite3_static) else()
endif() set(Soci_sqlite3_TARGET soci_sqlite3_static)
set(SOCI_sqlite3_PLUGIN ${SOCI_SQLITE3_TARGET}) endif()
set(Soci_sqlite3_FOUND TRUE)
endif() endif()
else() else()
# find_path(_Soci_INCLUDE_DIRS NAMES soci/soci.h)
### FIRST STEP: Find the soci headers.
# find_library(_Soci_LIBRARY
FIND_PATH(SOCI_INCLUDE_DIRS soci/soci.h NAMES soci_core soci_core${_Soci_VERSION} libsoci_core libsoci_core${_Soci_VERSION}
DOC "Soci (http://soci.sourceforge.net) include directory") PATH_SUFFIXES Frameworks lib lib64
MARK_AS_ADVANCED(SOCI_INCLUDE_DIRS) )
# if(_Soci_INCLUDE_DIRS AND _Soci_LIBRARY)
### SECOND STEP: Find the soci core library. Respect LIB_SUFFIX if(NOT TARGET soci)
# add_library(soci UNKNOWN IMPORTED)
FIND_LIBRARY(SOCI_LIBRARIES if(WIN32)
NAMES soci_core soci_core${_SOCI_VERSION} libsoci_core libsoci_core${_SOCI_VERSION} set_target_properties(soci PROPERTIES
PATH_SUFFIXES Frameworks lib lib64) INTERFACE_INCLUDE_DIRECTORIES "${_Soci_INCLUDE_DIRS}"
MARK_AS_ADVANCED(SOCI_LIBRARIES) IMPORTED_IMPLIB "${_Soci_LIBRARY}"
)
GET_FILENAME_COMPONENT(SOCI_LIBRARY_DIR ${SOCI_LIBRARIES} PATH) else()
MARK_AS_ADVANCED(SOCI_LIBRARY_DIR) set_target_properties(soci PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_Soci_INCLUDE_DIRS}"
# IMPORTED_LOCATION "${_Soci_LIBRARY}"
### THIRD STEP: Find all installed plugins if the library was found )
# endif()
IF(SOCI_INCLUDE_DIRS AND SOCI_LIBRARIES) endif()
set(Soci_TARGET soci)
MESSAGE(STATUS "Soci found: Looking for plugins")
FOREACH(plugin IN LISTS _SOCI_ALL_PLUGINS) message(STATUS "Soci found: Looking for plugins")
foreach(_Soci_PLUGIN IN LISTS _Soci_ALL_PLUGINS)
FIND_LIBRARY( find_library(_Soci_${_Soci_PLUGIN}_PLUGIN
SOCI_${plugin}_PLUGIN NAMES soci_${_Soci_PLUGIN} soci_${_Soci_PLUGIN}${_Soci_VERSION} libsoci_${_Soci_PLUGIN} libsoci_${_Soci_PLUGIN}${_Soci_VERSION}
NAMES soci_${plugin} soci_${plugin}${_SOCI_VERSION} libsoci_${plugin} libsoci_${plugin}${_SOCI_VERSION} PATH_SUFFIXES Frameworks lib lib64
PATH_SUFFIXES Frameworks lib lib64) )
MARK_AS_ADVANCED(SOCI_${plugin}_PLUGIN) if(_Soci_${_Soci_PLUGIN}_PLUGIN)
message(STATUS " * Plugin ${_Soci_PLUGIN} found ${_Soci_${_Soci_PLUGIN}_PLUGIN}.")
IF(SOCI_${plugin}_PLUGIN) if(NOT TARGET soci_${_Soci_PLUGIN})
MESSAGE(STATUS " * Plugin ${plugin} found ${SOCI_${plugin}_PLUGIN}.") add_library(soci_${_Soci_PLUGIN} UNKNOWN IMPORTED)
SET(SOCI_${plugin}_FOUND True) if(WIN32)
ELSE() set_target_properties(soci_${_Soci_PLUGIN} PROPERTIES
MESSAGE(STATUS " * Plugin ${plugin} not found.") INTERFACE_INCLUDE_DIRECTORIES "${_Soci_INCLUDE_DIRS}"
SET(SOCI_${plugin}_FOUND False) IMPORTED_IMPLIB "${_Soci_${_Soci_PLUGIN}_PLUGIN}"
ENDIF() )
else()
ENDFOREACH() set_target_properties(soci_${_Soci_PLUGIN} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_Soci_INCLUDE_DIRS}"
# IMPORTED_LOCATION "${_Soci_${_Soci_PLUGIN}_PLUGIN}"
### FOURTH CHECK: Check if the required components were all found )
# endif()
FOREACH(component ${Soci_FIND_COMPONENTS}) endif()
IF(NOT SOCI_${component}_FOUND) set(Soci_${_Soci_PLUGIN}_FOUND TRUE)
MESSAGE(SEND_ERROR "Required component ${component} not found. It seems that Soci was built without support of ${component}, consider rebuilding it.") set(Soci_${_Soci_PLUGIN}_TARGET soci_${_Soci_PLUGIN})
ENDIF() list(APPEND _Soci_CACHE_VARS Soci_${_Soci_PLUGIN}_TARGET)
ENDFOREACH() else()
message(STATUS " * Plugin ${_Soci_PLUGIN} not found.")
ENDIF() endif()
endforeach()
endif()
endif() endif()
# find_package_handle_standard_args(Soci
### ADHERE TO STANDARDS REQUIRED_VARS ${_Soci_REQUIRED_VARS}
# HANDLE_COMPONENTS
include(FindPackageHandleStandardArgs) )
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Soci DEFAULT_MSG ${_SOCI_REQUIRED_VARS}) mark_as_advanced(${_Soci_CACHE_VARS})
############################################################################
# FindSqlite3.cmake
# Copyright (C) 2014-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 sqlite3 include file and library
#
# SQLITE3_FOUND - system has sqlite3
# SQLITE3_INCLUDE_DIRS - the sqlite3 include directory
# SQLITE3_LIBRARIES - The libraries needed to use sqlite3
if(TARGET sqlite3)
set(SQLITE3_LIBRARIES sqlite3)
get_target_property(SQLITE3_INCLUDE_DIRS sqlite3 INTERFACE_INCLUDE_DIRECTORIES)
set(HAVE_SQLITE3_H 1)
else()
if(APPLE AND NOT IOS)
set(SQLITE3_HINTS "/usr")
endif()
if(SQLITE3_HINTS)
set(SQLITE3_LIBRARIES_HINTS "${SQLITE3_HINTS}/lib")
endif()
find_path(SQLITE3_INCLUDE_DIRS
NAMES sqlite3.h
HINTS "${SQLITE3_HINTS}"
PATH_SUFFIXES include
)
if(SQLITE3_INCLUDE_DIRS)
set(HAVE_SQLITE3_H 1)
endif()
find_library(SQLITE3_LIBRARIES
NAMES sqlite3
HINTS "${SQLITE3_LIBRARIES_HINTS}"
)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Sqlite3
DEFAULT_MSG
SQLITE3_INCLUDE_DIRS SQLITE3_LIBRARIES HAVE_SQLITE3_H
)
mark_as_advanced(SQLITE3_INCLUDE_DIRS SQLITE3_LIBRARIES HAVE_SQLITE3_H)
Supports Markdown
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