MacOs : Update Script for first automatic building and fix libraries references

This commit is contained in:
Julien Wadel 2020-01-31 15:43:53 +01:00
parent f502eb2719
commit fef46c1b68
4 changed files with 74 additions and 2 deletions

View file

@ -481,3 +481,11 @@ source_group(
source_group(
"Svg" REGULAR_EXPRESSION ".+\.svg$"
)
# ------------------------------
# Installation
# ------------------------------
install(SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake_builder/install.cmake")
#endif ()

36
build_all_macos.sh Executable file
View file

@ -0,0 +1,36 @@
#!/bin/sh
#Stop at error
set -e
if [[ -z ${Qt5_DIR} ]]; then
export Qt5_DIR=/usr/opt/qt/lib/cmake
export PATH=$PATH:/usr/local/opt/qt/bin
fi
#Creation of folders
mkdir -p build-desktop
mkdir -p linphone-sdk/build-sdk
mkdir -p submodules/externals/minizip/build-minizip
#SDK building
cd linphone-sdk/build-sdk
cmake .. -DLINPHONESDK_DOXYGEN_PROGRAM=/Applications/Doxygen.app/Contents/Resources/doxygen -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
cmake --build . --target all --parallel 5
rsync -a linphone-sdk/desktop/ ../../build-desktop/OUTPUT/
cd ../..
#MiniZip Building
cd submodules/externals/minizip/build-minizip
cmake .. -DCMAKE_INSTALL_PREFIX=../../../../build-desktop/OUTPUT -DCMAKE_PREFIX_PATH=../../../build-desktop/OUTPUT
cmake --build . --target all --parallel 5
cmake --build . --target install
cd ../../../..
#Desktop Building
cd build-desktop
cmake .. -DCMAKE_INSTALL_PREFIX=OUTPUT
cmake --build . --target all
cmake --build . --target install

View file

@ -1,6 +1,6 @@
############################################################################
# CMakeLists.txt
# Copyright (C) 2017-2018 Belledonne Communications, Grenoble France
# Copyright (C) 2017-2020 Belledonne Communications, Grenoble France
#
############################################################################
#
@ -20,7 +20,7 @@
#
############################################################################
lcb_define_target("linphoneqt" "linphone" "ms2plugins")
lcb_define_targets("linphoneqt" "linphone" "ms2plugins")
#if (NOT WIN32 AND NOT APPLE)

View file

@ -0,0 +1,28 @@
############################################################################
# packaging.cmake
# Copyright (C) 2017-2020 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.
#
############################################################################
if (APPLE)
execute_process(COMMAND install_name_tool -id "@executable_path/../lib/libminizip.dylib" "${CMAKE_INSTALL_PREFIX}/lib/libminizip.dylib")
execute_process(COMMAND install_name_tool -add_rpath "@executable_path/../Frameworks/" "${CMAKE_INSTALL_PREFIX}/bin/linphone")
execute_process(COMMAND install_name_tool -add_rpath "@executable_path/../lib/" "${CMAKE_INSTALL_PREFIX}/bin/linphone")
else ()
endif ()