Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
c769c798
Commit
c769c798
authored
Mar 08, 2017
by
Ghislain MARY
Browse files
Fix build with CMake Android toolchain.
parent
fb21732c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
4 deletions
+85
-4
cmake/FindCpuFeatures.cmake
cmake/FindCpuFeatures.cmake
+38
-0
cmake/FindSupport.cmake
cmake/FindSupport.cmake
+38
-0
coreapi/CMakeLists.txt
coreapi/CMakeLists.txt
+8
-3
tester/CMakeLists.txt
tester/CMakeLists.txt
+1
-1
No files found.
cmake/FindCpuFeatures.cmake
0 → 100644
View file @
c769c798
############################################################################
# FindCpuFeatures.cmake
# Copyright (C) 2017 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_LIBRARIES - The libraries needed to use libcpufeatures
find_library
(
CPUFEATURES_LIBRARIES
NAMES cpufeatures
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
CpuFeatures
DEFAULT_MSG
CPUFEATURES_LIBRARIES
)
mark_as_advanced
(
CPUFEATURES_LIBRARIES
)
cmake/FindSupport.cmake
0 → 100644
View file @
c769c798
############################################################################
# FindSupport.cmake
# Copyright (C) 2017 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 support include file and library
#
# SUPPORT_FOUND - system has libsupport
# SUPPORT_LIBRARIES - The libraries needed to use libsupport
find_library
(
SUPPORT_LIBRARIES
NAMES support
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
Support
DEFAULT_MSG
SUPPORT_LIBRARIES
)
mark_as_advanced
(
SUPPORT_LIBRARIES
)
coreapi/CMakeLists.txt
View file @
c769c798
...
...
@@ -28,6 +28,10 @@ endif()
if
(
NOT WIN32
)
find_package
(
Iconv QUIET
)
endif
()
if
(
ANDROID
)
find_package
(
CpuFeatures REQUIRED
)
find_package
(
Support REQUIRED
)
endif
()
set
(
LINPHONE_PRIVATE_HEADER_FILES
...
...
@@ -213,8 +217,8 @@ if(ENABLE_SHARED)
if
(
BELCARD_FOUND
)
if
(
APPLE
)
set_target_properties
(
linphone PROPERTIES LINK_FLAGS
"-stdlib=libc++"
)
endif
()
set_target_properties
(
linphone PROPERTIES LINK_FLAGS
"-stdlib=libc++"
)
endif
()
endif
()
set_target_properties
(
linphone PROPERTIES LINKER_LANGUAGE CXX
)
...
...
@@ -227,7 +231,8 @@ if(ENABLE_SHARED)
if
(
WIN32 AND CMAKE_SYSTEM_NAME STREQUAL
"WindowsPhone"
AND NOT CMAKE_SYSTEM_NAME STREQUAL
"WindowsStore"
)
set_target_properties
(
linphone PROPERTIES PREFIX
"lib"
)
elseif
(
ANDROID
)
set_target_properties
(
linphone PROPERTIES OUTPUT_NAME
"linphone-
${
NDK_ARCHITECTURE
}
"
)
target_link_libraries
(
linphone PUBLIC
"log"
${
SUPPORT_LIBRARIES
}
${
CPUFEATURES_LIBRARIES
}
)
set_target_properties
(
linphone PROPERTIES OUTPUT_NAME
"linphone-
${
CMAKE_ANDROID_ARCH_ABI
}
"
)
add_dependencies
(
linphone linphonecore-jni-header
)
endif
()
if
(
MSVC
)
...
...
tester/CMakeLists.txt
View file @
c769c798
...
...
@@ -221,7 +221,7 @@ endif()
if
(
ANDROID OR IOS
)
if
(
ANDROID
)
add_library
(
linphonetester SHARED
${
SOURCE_FILES_C
}
)
set_target_properties
(
linphonetester PROPERTIES OUTPUT_NAME
"linphonetester-
${
NDK_ARCHITECTURE
}
"
)
set_target_properties
(
linphonetester PROPERTIES OUTPUT_NAME
"linphonetester-
${
CMAKE_ANDROID_ARCH_ABI
}
"
)
endif
()
if
(
IOS
)
add_library
(
linphonetester STATIC
${
SOURCE_FILES_C
}
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment