diff --git a/CMakeLists.txt b/CMakeLists.txt index 959047560..d41b5742a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,6 +97,8 @@ if (ENABLE_DBUS) endif () set(QT5_PACKAGES_OPTIONAL TextToSpeech) +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + if (LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS) include("${EP_linphone_CONFIG_DIR}/wrappers/cpp/LinphoneCxxConfig.cmake") include("${EP_bctoolbox_CONFIG_DIR}/BcToolboxConfig.cmake") @@ -107,6 +109,7 @@ else () find_package(BcToolbox REQUIRED) find_package(Belcard REQUIRED) find_package(Mediastreamer2 REQUIRED) + find_package(Minizip REQUIRED) endif () set(SOURCES @@ -366,8 +369,8 @@ endif () set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME "${EXECUTABLE_NAME}") set_target_properties(${TESTER_TARGET_NAME} PROPERTIES OUTPUT_NAME "${TESTER_EXECUTABLE_NAME}") -set(INCLUDED_DIRECTORIES "${LINPHONECXX_INCLUDE_DIRS}" "${BELCARD_INCLUDE_DIRS}" "${BCTOOLBOX_INCLUDE_DIRS}" "${MEDIASTREAMER2_INCLUDE_DIRS}") -set(LIBRARIES ${BCTOOLBOX_CORE_LIBRARIES} ${BELCARD_LIBRARIES} ${LINPHONECXX_LIBRARIES}) +set(INCLUDED_DIRECTORIES "${LINPHONECXX_INCLUDE_DIRS}" "${BELCARD_INCLUDE_DIRS}" "${BCTOOLBOX_INCLUDE_DIRS}" "${MEDIASTREAMER2_INCLUDE_DIRS}" "${MINIZIP_INCLUDE_DIRS}") +set(LIBRARIES ${BCTOOLBOX_CORE_LIBRARIES} ${BELCARD_LIBRARIES} ${LINPHONECXX_LIBRARIES} ${MINIZIP_LIBRARIES}) foreach (package ${QT5_PACKAGES}) list(APPEND INCLUDED_DIRECTORIES "${Qt5${package}_INCLUDE_DIRS}") diff --git a/cmake/FindMinizip.cmake b/cmake/FindMinizip.cmake new file mode 100644 index 000000000..9372ae596 --- /dev/null +++ b/cmake/FindMinizip.cmake @@ -0,0 +1,48 @@ +############################################################################ +# FindMinizip.txt +# 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) diff --git a/cmake_builder/linphoneqt.cmake b/cmake_builder/linphoneqt.cmake index 398393afd..5f5064149 100644 --- a/cmake_builder/linphoneqt.cmake +++ b/cmake_builder/linphoneqt.cmake @@ -22,7 +22,7 @@ lcb_external_source_paths("..") -lcb_dependencies("linphone" "ms2plugins") +lcb_dependencies("linphone" "ms2plugins" "minizip") lcb_groupable(YES) lcb_package_source(YES)