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
belle-sip
Commits
26d982b7
Commit
26d982b7
authored
Jan 03, 2014
by
Ghislain MARY
Browse files
Add CMakeLists.txt to compile using cmake.
parent
9dd52e29
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
0 deletions
+137
-0
CMakeLists.txt
CMakeLists.txt
+40
-0
include/CMakeLists.txt
include/CMakeLists.txt
+6
-0
src/CMakeLists.txt
src/CMakeLists.txt
+91
-0
No files found.
CMakeLists.txt
0 → 100644
View file @
26d982b7
cmake_minimum_required
(
VERSION 2.6
)
project
(
BELLESIP C
)
if
(
NOT ANTLR3_ROOT_DIR
)
set
(
ANTLR3_ROOT_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/../antlr3
)
endif
()
if
(
NOT ANTLR3C_INCLUDE_DIR
)
set
(
ANTLR3C_INCLUDE_DIR
${
ANTLR3_ROOT_DIR
}
/runtime/C/include
)
endif
()
if
(
NOT POLARSSL_INCLUDE_DIR
)
set
(
POLARSSL_INCLUDE_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/../polarssl/include
)
endif
()
if
(
NOT ORTP_ROOT_DIR
)
set
(
ORTP_ROOT_DIR
${
CMAKE_CURRENT_SOURCE_DIR
}
/../linphone/oRTP
)
endif
()
include_directories
(
include/
${
CMAKE_CURRENT_BINARY_DIR
}
/src/
src/
)
if
(
USE_INSTALLED_COMPONENTS
)
include_directories
(
${
CMAKE_INSTALL_PREFIX
}
/include
)
else
()
include_directories
(
${
ANTLR3C_INCLUDE_DIR
}
${
POLARSSL_INCLUDE_DIR
}
)
if
(
WIN32
)
include_directories
(
${
ORTP_ROOT_DIR
}
/build/vsx/oRTP/oRTP/
)
endif
(
WIN32
)
endif
()
add_subdirectory
(
include
)
add_subdirectory
(
src
)
if
(
INSTALL_COMPONENT_IN_POSTBUILD
)
add_install_target
(
INSTALL_libbellesip COMP_libbellesip libbellesip
)
endif
()
include/CMakeLists.txt
0 → 100644
View file @
26d982b7
file
(
GLOB HEADER_FILES
"belle-sip/*.h"
)
install
(
FILES
${
HEADER_FILES
}
COMPONENT COMP_libbellesip
DESTINATION include/belle-sip
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
src/CMakeLists.txt
0 → 100644
View file @
26d982b7
set
(
SDP_GENERATED_SOURCE_FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/belle_sdpLexer.c
${
CMAKE_CURRENT_BINARY_DIR
}
/belle_sdpLexer.h
${
CMAKE_CURRENT_BINARY_DIR
}
/belle_sdpParser.c
${
CMAKE_CURRENT_BINARY_DIR
}
/belle_sdpParser.h
)
add_custom_command
(
OUTPUT
${
SDP_GENERATED_SOURCE_FILES
}
COMMAND java -jar
${
ANTLR3_ROOT_DIR
}
/antlr-3.4-complete.jar -make -fo
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/belle_sdp.g
DEPENDS belle_sdp.g
)
set
(
SIP_MESSAGE_GENERATED_SOURCE_FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/belle_sip_messageLexer.c
${
CMAKE_CURRENT_BINARY_DIR
}
/belle_sip_messageLexer.h
${
CMAKE_CURRENT_BINARY_DIR
}
/belle_sip_messageParser.c
${
CMAKE_CURRENT_BINARY_DIR
}
/belle_sip_messageParser.h
)
add_custom_command
(
OUTPUT
${
SIP_MESSAGE_GENERATED_SOURCE_FILES
}
COMMAND java -jar
${
ANTLR3_ROOT_DIR
}
/antlr-3.4-complete.jar -make -fo
${
CMAKE_CURRENT_BINARY_DIR
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/belle_sip_message.g
DEPENDS belle_sip_message.g
)
set
(
SOURCE_FILES
auth_event.c
auth_helper.c
belle_sdp_impl.c
belle_sip_headers_impl.c
belle_sip_loop.c
belle_sip_object.c
belle_sip_parameters.c
belle_sip_resolver.c
belle_sip_uri_impl.c
belle_sip_utils.c
channel.c
dialog.c
dns.c
ict.c
ist.c
listeningpoint.c
md5.c
message.c
nict.c
nist.c
port.c
provider.c
refresher.c
siplistener.c
sipstack.c
transaction.c
transports/stream_channel.c
transports/stream_listeningpoint.c
transports/tls_channel_polarssl.c
transports/tls_listeningpoint_polarssl.c
transports/udp_channel.c
transports/udp_listeningpoint.c
${
SDP_GENERATED_SOURCE_FILES
}
${
SIP_MESSAGE_GENERATED_SOURCE_FILES
}
)
add_definitions
(
-DBELLESIP_EXPORTS
-DBELLESIP_INTERNAL_EXPORTS
-DHAVE_POLARSSL
-DHAVE_ANTLR_STRING_STREAM_NEW
-DHAVE_COMPILER_TLS
-DPACKAGE_VERSION=
"1.2.4"
)
if
(
WIN32
)
set
(
LIBS ws2_32
)
endif
(
WIN32
)
set
(
LIBS
${
LIBS
}
libantlr3c libpolarssl
)
add_library
(
libbellesip SHARED
${
SOURCE_FILES
}
)
set_target_properties
(
libbellesip PROPERTIES VERSION 1.2.4 SOVERSION 1
)
target_link_libraries
(
libbellesip
${
LIBS
}
)
install
(
TARGETS libbellesip
COMPONENT COMP_libbellesip
DESTINATION
${
LIB_INSTALL_DIR
}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
if
(
USE_INSTALLED_COMPONENTS
)
add_dependencies
(
libbellesip
INSTALL_libantlr3c
INSTALL_libpolarssl
INSTALL_libortp
)
endif
()
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