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
48a2e662
Commit
48a2e662
authored
Aug 03, 2014
by
Ghislain MARY
Browse files
Improve compilation with CMake by using CMake modules to find the dependencies.
parent
09b56423
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
123 additions
and
24 deletions
+123
-24
CMakeLists.txt
CMakeLists.txt
+46
-5
coreapi/CMakeLists.txt
coreapi/CMakeLists.txt
+33
-12
share/CMakeLists.txt
share/CMakeLists.txt
+22
-7
share/rings/CMakeLists.txt
share/rings/CMakeLists.txt
+22
-0
No files found.
CMakeLists.txt
View file @
48a2e662
############################################################################
# CMakeLists.txt
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
cmake_minimum_required
(
VERSION 2.6
)
project
(
LINPHONE C
)
option
(
LINPHONE_ENABLE_VIDEO
"Build linphone with video support."
ON
)
option
(
ENABLE_STATIC
"Build static library (default is shared library)."
NO
)
option
(
ENABLE_VIDEO
"Build with video support."
YES
)
list
(
APPEND CMAKE_MODULE_PATH
${
CMAKE_PREFIX_PATH
}
/share/cmake/Modules
)
include
(
CheckIncludeFile
)
if
(
MSVC
)
list
(
APPEND CMAKE_REQUIRED_INCLUDES
${
CMAKE_PREFIX_PATH
}
/include/MSVC
)
endif
()
find_package
(
BelleSIP REQUIRED
)
find_package
(
MS2 REQUIRED
)
find_package
(
XML2 REQUIRED
)
include_directories
(
include/
coreapi/
${
CMAKE_CURRENT_BINARY_DIR
}
/coreapi/
${
BELLESIP_INCLUDE_DIRS
}
${
MS2_INCLUDE_DIRS
}
${
XML2_INCLUDE_DIRS
}
)
i
nclude_directories
(
${
CMAKE_INSTALL
_PREFIX
}
/include
${
CMAKE_INSTALL_PREFIX
}
/include/libxml2
)
i
f
(
MSVC
)
include_directories
(
${
CMAKE
_PREFIX
_PATH
}
/include
/MSVC
)
endif
()
add_subdirectory
(
coreapi
)
add_subdirectory
(
share
)
coreapi/CMakeLists.txt
View file @
48a2e662
############################################################################
# CMakeLists.txt
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
if
(
MSVC
)
find_library
(
LIBGCC NAMES gcc
)
find_library
(
LIBMINGWEX NAMES mingwex
)
endif
()
find_library
(
LIBORTP NAMES ortp
)
find_library
(
LIBMEDIASTREAMER_BASE NAMES mediastreamer_base
)
find_library
(
LIBMEDIASTREAMER_VOIP NAMES mediastreamer_voip
)
find_library
(
LIBBELLESIP NAMES bellesip
)
find_library
(
LIBXML2 NAMES xml2
)
find_program
(
GIT git
)
...
...
@@ -111,19 +128,23 @@ add_definitions(
-DLINPHONE_PLUGINS_DIR=
""
)
if
(
LINPHONE_
ENABLE_VIDEO
)
if
(
ENABLE_VIDEO
)
add_definitions
(
-DVIDEO_ENABLED
)
endif
(
LINPHONE_ENABLE_VIDEO
)
endif
()
set
(
LIBS
${
LIBGCC
}
${
LIBMINGWEX
}
${
BELLESIP_LIBRARIES
}
${
MS2_LIBRARIES
}
${
XML2_LIBRARIES
}
)
if
(
WIN32
)
add_definitions
(
-DWINDOW_NATIVE
/FIliblinphone_gitversion.h
)
set
(
LIBS ws2_32
)
endif
(
WIN32
)
set
(
LIBS
${
LIBS
}
${
LIBGCC
}
${
LIBMINGWEX
}
${
LIBORTP
}
${
LIBMEDIASTREAMER_BASE
}
${
LIBMEDIASTREAMER_VOIP
}
${
LIBBELLESIP
}
${
LIBXML2
}
)
endif
()
add_library
(
linphone SHARED
${
SOURCE_FILES
}
)
set_target_properties
(
linphone PROPERTIES VERSION 3.7.0 SOVERSION 5
)
...
...
@@ -150,4 +171,4 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/linphone.pdb
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif
()
endif
(
WIN32
)
endif
()
share/CMakeLists.txt
View file @
48a2e662
############################################################################
# CMakeLists.txt
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
install
(
FILES archived-rootca.pem
RENAME rootca.pem
COMPONENT COMP_liblinphone
DESTINATION share/linphone
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
install
(
FILES ringback.wav
COMPONENT COMP_liblinphone
DESTINATION share/sounds/linphone
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
add_subdirectory
(
rings
)
install
(
FILES ../mediastreamer2/src/voip/nowebcamCIF.jpg
COMPONENT COMP_liblinphone
DESTINATION share/images
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
share/rings/CMakeLists.txt
View file @
48a2e662
############################################################################
# CMakeLists.txt
# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
############################################################################
install
(
FILES oldphone.wav toy-mono.wav
COMPONENT COMP_liblinphone
DESTINATION share/sounds/linphone/rings
...
...
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