summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubos Dolezel <lubos@dolezel.info>2015-06-01 16:38:53 +0200
committerLubos Dolezel <lubos@dolezel.info>2015-06-01 16:38:53 +0200
commit2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689 (patch)
treed5e801c683f59a4471ba9d64f2b22ab7908a8b8b
parent545703d60acb8b0245e3d79e5dfd7171ca10c572 (diff)
downloadtwinkle-2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689.tar
twinkle-2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689.tar.gz
twinkle-2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689.tar.lz
twinkle-2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689.tar.xz
twinkle-2142a3eaa4c1eb99aa1e4c7d95a4e1115bc4c689.zip
Many submodules building (no gui yet), with link-time errors
-rw-r--r--CMakeLists.txt65
-rw-r--r--cmake/FindCcrtp.cmake17
-rw-r--r--cmake/FindCommoncpp.cmake17
-rw-r--r--cmake/FindLibMagic.cmake74
-rw-r--r--cmake/FindLibSndfile.cmake18
-rw-r--r--cmake/FindReadline.cmake47
-rw-r--r--cmake/FindUcommon.cmake19
-rw-r--r--src/CMakeLists.txt77
-rw-r--r--src/audio/CMakeLists.txt26
-rw-r--r--src/audio/gsm/src/CMakeLists.txt26
-rw-r--r--src/audits/CMakeLists.txt7
-rw-r--r--src/im/CMakeLists.txt8
-rw-r--r--src/mwi/CMakeLists.txt10
-rw-r--r--src/parser/CMakeLists.txt84
-rw-r--r--src/patterns/CMakeLists.txt7
-rw-r--r--src/presence/CMakeLists.txt12
-rw-r--r--src/sdp/CMakeLists.txt13
-rw-r--r--src/sockets/CMakeLists.txt12
-rw-r--r--src/sockets/socket.cpp10
-rw-r--r--src/stun/CMakeLists.txt9
-rw-r--r--src/threads/CMakeLists.txt9
-rw-r--r--src/utils/CMakeLists.txt8
-rw-r--r--twinkle_config.h.in12
23 files changed, 582 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f698e29..4ccb7cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,21 +2,73 @@ project(twinkle)
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
+set(PRODUCT_VERSION "1.9.0")
+set(PRODUCT_DATE "June 1, 2015")
+
OPTION(WITH_ZRTP "Enable ZRTP encrypted calls" OFF)
OPTION(WITH_SPEEX "Enable the Speex codec" OFF)
OPTION(WITH_ILBC "Enable the iLBC codec" OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
+
+include (CheckIncludeFile)
find_package(Qt4 REQUIRED)
+find_package(LibXml2 REQUIRED)
+find_package(ALSA REQUIRED)
+find_package(LibMagic REQUIRED)
+find_package(LibSndfile REQUIRED)
+find_package(Readline REQUIRED)
+#find_package(BISON)
+#find_package(FLEX)
+
+include_directories(${LIBXML2_INCLUDE_DIR})
if (WITH_ZRTP)
find_package(Zrtpcpp)
if (ZRTPCPP_FOUND)
message(STATUS "libzrtpcpp OK")
+
+ include_directories(${ZRTPCPP_INCLUDE_DIR})
else (ZRTPCPP_FOUND)
message(FATAL_ERROR "libzrtpcpp not found!")
endif (ZRTPCPP_FOUND)
+
+ #####
+
+ find_package(Ccrtp)
+
+ if (CCRTP_FOUND)
+ message(STATUS "ccrtp OK")
+
+ include_directories(${CCRTP_INCLUDE_DIR})
+ else (CCRTP_FOUND)
+ message(FATAL_ERROR "ccrtp not found!")
+ endif (CCRTP_FOUND)
+
+ #####
+
+ find_package(Commoncpp)
+
+ if (COMMONCPP_FOUND)
+ message(STATUS "commoncpp OK")
+
+ include_directories(${COMMONCPP_INCLUDE_DIR})
+ else (COMMONCPP_FOUND)
+ message(FATAL_ERROR "commoncpp not found!")
+ endif (COMMONCPP_FOUND)
+
+ #####
+
+ find_package(Ucommon)
+
+ if (UCOMMON_FOUND)
+ message(STATUS "ucommon OK")
+
+ include_directories(${UCOMMON_INCLUDE_DIR})
+ else (UCOMMON_FOUND)
+ message(FATAL_ERROR "ucommon not found!")
+ endif (UCOMMON_FOUND)
endif (WITH_ZRTP)
if (WITH_SPEEX)
@@ -24,6 +76,8 @@ if (WITH_SPEEX)
if (SPEEX_FOUND)
message(STATUS "Speex OK")
+
+ include_directories(${SPEEX_INCLUDE_DIR})
else (SPEEX_FOUND)
message(FATAL_ERROR "Speex not found!")
endif (SPEEX_FOUND)
@@ -34,7 +88,18 @@ if (WITH_ILBC)
if (ILBC_FOUND)
message(STATUS "iLBC OK")
+
+ include_directories(${ILBC_INCLUDE_DIR})
else (ILBC_FOUND)
message(FATAL_ERROR "iLBC not found!")
endif (ILBC_FOUND)
endif (WITH_ILBC)
+
+check_include_file(unistd.h HAVE_UNISTD_H)
+check_include_file(linux/types.h HAVE_LINUX_TYPES_H)
+check_include_file(linux/errqueue.h HAVE_LINUX_ERRQUEUE_H)
+
+configure_file(twinkle_config.h.in twinkle_config.h)
+include_directories("${CMAKE_BINARY_DIR}")
+
+add_subdirectory(src)
diff --git a/cmake/FindCcrtp.cmake b/cmake/FindCcrtp.cmake
new file mode 100644
index 0000000..93a9e31
--- /dev/null
+++ b/cmake/FindCcrtp.cmake
@@ -0,0 +1,17 @@
+FIND_PATH(CCRTP_INCLUDE_DIR ccrtp/rtp.h)
+FIND_LIBRARY(CCRTP_LIBRARIES NAMES ccrtp)
+
+IF(CCRTP_INCLUDE_DIR AND CCRTP_LIBRARIES)
+ SET(CCRTP_FOUND TRUE)
+ENDIF(CCRTP_INCLUDE_DIR AND CCRTP_LIBRARIES)
+
+IF(CCRTP_FOUND)
+ IF (NOT Ccrtp_FIND_QUIETLY)
+ MESSAGE(STATUS "Found ccrtp includes: ${CCRTP_INCLUDE_DIR}/ccrtp/rtp.h")
+ MESSAGE(STATUS "Found ccrtp library: ${CCRTP_LIBRARIES}")
+ ENDIF (NOT Ccrtp_FIND_QUIETLY)
+ELSE(CCRTP_FOUND)
+ IF (Ccrtp_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could NOT find ccrtp development files")
+ ENDIF (Ccrtp_FIND_REQUIRED)
+ENDIF(CCRTP_FOUND)
diff --git a/cmake/FindCommoncpp.cmake b/cmake/FindCommoncpp.cmake
new file mode 100644
index 0000000..8a83e29
--- /dev/null
+++ b/cmake/FindCommoncpp.cmake
@@ -0,0 +1,17 @@
+FIND_PATH(COMMONCPP_INCLUDE_DIR commoncpp/config.h)
+FIND_LIBRARY(COMMONCPP_LIBRARIES NAMES commoncpp)
+
+IF(COMMONCPP_INCLUDE_DIR AND COMMONCPP_LIBRARIES)
+ SET(COMMONCPP_FOUND TRUE)
+ENDIF(COMMONCPP_INCLUDE_DIR AND COMMONCPP_LIBRARIES)
+
+IF(COMMONCPP_FOUND)
+ IF (NOT Commoncpp_FIND_QUIETLY)
+ MESSAGE(STATUS "Found commoncpp includes: ${COMMONCPP_INCLUDE_DIR}/commoncpp/config.h")
+ MESSAGE(STATUS "Found commoncpp library: ${COMMONCPP_LIBRARIES}")
+ ENDIF (NOT Commoncpp_FIND_QUIETLY)
+ELSE(COMMONCPP_FOUND)
+ IF (Commoncpp_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could NOT find commoncpp development files")
+ ENDIF (Commoncpp_FIND_REQUIRED)
+ENDIF(COMMONCPP_FOUND)
diff --git a/cmake/FindLibMagic.cmake b/cmake/FindLibMagic.cmake
new file mode 100644
index 0000000..ba0abd6
--- /dev/null
+++ b/cmake/FindLibMagic.cmake
@@ -0,0 +1,74 @@
+# - Try to find libmagic header and library
+#
+# Usage of this module as follows:
+#
+# find_package(LibMagic)
+#
+# Variables used by this module, they can change the default behaviour and need
+# to be set before calling find_package:
+#
+# LibMagic_ROOT_DIR Set this variable to the root installation of
+# libmagic if the module has problems finding the
+# proper installation path.
+#
+# Variables defined by this module:
+#
+# LIBMAGIC_FOUND System has libmagic, magic.h, and file
+# LibMagic_FILE_EXE Path to the 'file' command
+# LibMagic_VERSION Version of libmagic
+# LibMagic_LIBRARY The libmagic library
+# LibMagic_INCLUDE_DIR The location of magic.h
+
+find_path(LibMagic_ROOT_DIR
+ NAMES include/magic.h
+)
+
+if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ # the static version of the library is preferred on OS X for the
+ # purposes of making packages (libmagic doesn't ship w/ OS X)
+ set(libmagic_names libmagic.a magic)
+else ()
+ set(libmagic_names magic)
+endif ()
+
+find_file(LibMagic_FILE_EXE
+ NAMES file
+ HINTS ${LibMagic_ROOT_DIR}/bin
+)
+
+find_library(LibMagic_LIBRARY
+ NAMES ${libmagic_names}
+ HINTS ${LibMagic_ROOT_DIR}/lib
+)
+
+find_path(LibMagic_INCLUDE_DIR
+ NAMES magic.h
+ HINTS ${LibMagic_ROOT_DIR}/include
+)
+
+if (LibMagic_FILE_EXE)
+ execute_process(COMMAND "${LibMagic_FILE_EXE}" --version
+ ERROR_VARIABLE LibMagic_VERSION
+ OUTPUT_VARIABLE LibMagic_VERSION)
+ string(REGEX REPLACE "^file-([0-9.]+).*$" "\\1"
+ LibMagic_VERSION "${LibMagic_VERSION}")
+ message(STATUS "libmagic version: ${LibMagic_VERSION}")
+else ()
+ set(LibMagic_VERSION NOTFOUND)
+endif ()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LibMagic DEFAULT_MSG
+ LibMagic_LIBRARY
+ LibMagic_INCLUDE_DIR
+ LibMagic_FILE_EXE
+ LibMagic_VERSION
+)
+
+mark_as_advanced(
+ LibMagic_ROOT_DIR
+ LibMagic_FILE_EXE
+ LibMagic_VERSION
+ LibMagic_LIBRARY
+ LibMagic_INCLUDE_DIR
+)
diff --git a/cmake/FindLibSndfile.cmake b/cmake/FindLibSndfile.cmake
new file mode 100644
index 0000000..b333312
--- /dev/null
+++ b/cmake/FindLibSndfile.cmake
@@ -0,0 +1,18 @@
+FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h)
+
+SET(LIBSNDFILE_NAMES ${LIBSNDFILE_NAMES} sndfile)
+FIND_LIBRARY(LIBSNDFILE_LIBRARY NAMES ${LIBSNDFILE_NAMES} PATH)
+
+IF(LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY)
+ SET(LIBSNDFILE_FOUND TRUE)
+ENDIF(LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY)
+
+IF(LIBSNDFILE_FOUND)
+ IF(NOT LibSndfile_FIND_QUIETLY)
+ MESSAGE(STATUS "Found LibSndfile: ${LIBSNDFILE_LIBRARY}")
+ ENDIF (NOT LibSndfile_FIND_QUIETLY)
+ELSE(LIBSNDFILE_FOUND)
+ IF(LibSndfile_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find sndfile")
+ ENDIF(LibSndfile_FIND_REQUIRED)
+ENDIF (LIBSNDFILE_FOUND)
diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake
new file mode 100644
index 0000000..745cfe5
--- /dev/null
+++ b/cmake/FindReadline.cmake
@@ -0,0 +1,47 @@
+# - Try to find readline include dirs and libraries
+#
+# Usage of this module as follows:
+#
+# find_package(Readline)
+#
+# Variables used by this module, they can change the default behaviour and need
+# to be set before calling find_package:
+#
+# Readline_ROOT_DIR Set this variable to the root installation of
+# readline if the module has problems finding the
+# proper installation path.
+#
+# Variables defined by this module:
+#
+# READLINE_FOUND System has readline, include and lib dirs found
+# Readline_INCLUDE_DIR The readline include directories.
+# Readline_LIBRARY The readline library.
+
+find_path(Readline_ROOT_DIR
+ NAMES include/readline/readline.h
+)
+
+find_path(Readline_INCLUDE_DIR
+ NAMES readline/readline.h
+ HINTS ${Readline_ROOT_DIR}/include
+)
+
+find_library(Readline_LIBRARY
+ NAMES readline
+ HINTS ${Readline_ROOT_DIR}/lib
+)
+
+if(Readline_INCLUDE_DIR AND Readline_LIBRARY AND Ncurses_LIBRARY)
+ set(READLINE_FOUND TRUE)
+else(Readline_INCLUDE_DIR AND Readline_LIBRARY AND Ncurses_LIBRARY)
+ FIND_LIBRARY(Readline_LIBRARY NAMES readline)
+ include(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG Readline_INCLUDE_DIR Readline_LIBRARY )
+ MARK_AS_ADVANCED(Readline_INCLUDE_DIR Readline_LIBRARY)
+endif(Readline_INCLUDE_DIR AND Readline_LIBRARY AND Ncurses_LIBRARY)
+
+mark_as_advanced(
+ Readline_ROOT_DIR
+ Readline_INCLUDE_DIR
+ Readline_LIBRARY
+)
diff --git a/cmake/FindUcommon.cmake b/cmake/FindUcommon.cmake
new file mode 100644
index 0000000..a61257b
--- /dev/null
+++ b/cmake/FindUcommon.cmake
@@ -0,0 +1,19 @@
+FIND_PATH(UCOMMON_INCLUDE_DIR ucommon/ucommon.h)
+FIND_LIBRARY(UCOMMON_LIBRARIES NAMES ucommon)
+FIND_LIBRARY(USECURE_LIBRARIES NAMES usecure)
+
+IF(UCOMMON_INCLUDE_DIR AND UCOMMON_LIBRARIES AND USECURE_LIBRARIES)
+ SET(UCOMMON_FOUND TRUE)
+ SET(UCOMMON_LIBRARIES ${UCOMMON_LIBRARIES} ${USECURE_LIBRARIES})
+ENDIF(UCOMMON_INCLUDE_DIR AND UCOMMON_LIBRARIES)
+
+IF(UCOMMON_FOUND)
+ IF (NOT Ucommon_FIND_QUIETLY)
+ MESSAGE(STATUS "Found ucommon includes: ${UCOMMON_INCLUDE_DIR}/ucommon/ucommon.h")
+ MESSAGE(STATUS "Found ucommon library: ${UCOMMON_LIBRARIES}")
+ ENDIF (NOT Ucommon_FIND_QUIETLY)
+ELSE(UCOMMON_FOUND)
+ IF (Ucommon_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could NOT find ucommon development files")
+ ENDIF (Ucommon_FIND_REQUIRED)
+ENDIF(UCOMMON_FOUND)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..2adf512
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,77 @@
+project(libtwinkle)
+
+include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
+
+add_subdirectory(audio)
+add_subdirectory(audio/gsm/src)
+add_subdirectory(audits)
+add_subdirectory(im)
+add_subdirectory(mwi)
+add_subdirectory(parser)
+add_subdirectory(patterns)
+add_subdirectory(presence)
+add_subdirectory(sdp)
+add_subdirectory(sockets)
+add_subdirectory(stun)
+add_subdirectory(threads)
+add_subdirectory(utils)
+
+set(LIBTWINKLE_SRCS
+ main.cpp
+ abstract_dialog.cpp
+ address_book.cpp
+ auth.cpp
+ call_history.cpp
+ call_script.cpp
+ client_request.cpp
+ cmd_socket.cpp
+ dialog.cpp
+ diamondcard.cpp
+ epa.cpp
+ events.cpp
+ id_object.cpp
+ line.cpp
+ listener.cpp
+ log.cpp
+ phone.cpp
+ phone_user.cpp
+ prohibit_thread.cpp
+ redirect.cpp
+ sender.cpp
+ service.cpp
+ session.cpp
+ sub_refer.cpp
+ subscription.cpp
+ subscription_dialog.cpp
+ sys_settings.cpp
+ timekeeper.cpp
+ transaction.cpp
+ transaction_layer.cpp
+ transaction_mgr.cpp
+ user.cpp
+ userintf.cpp
+ util.cpp
+
+ $<TARGET_OBJECTS:libtwinkle-audio>
+ $<TARGET_OBJECTS:libtwinkle-gsm>
+ $<TARGET_OBJECTS:libtwinkle-audits>
+ $<TARGET_OBJECTS:libtwinkle-im>
+ $<TARGET_OBJECTS:libtwinkle-mwi>
+ $<TARGET_OBJECTS:libtwinkle-parser>
+ $<TARGET_OBJECTS:libtwinkle-patterns>
+ $<TARGET_OBJECTS:libtwinkle-presence>
+ $<TARGET_OBJECTS:libtwinkle-sdp>
+ $<TARGET_OBJECTS:libtwinkle-sockets>
+ $<TARGET_OBJECTS:libtwinkle-stun>
+ $<TARGET_OBJECTS:libtwinkle-threads>
+ $<TARGET_OBJECTS:libtwinkle-utils>
+)
+
+add_executable(twinkle
+ ${LIBTWINKLE_SRCS})
+
+target_link_libraries(twinkle -lpthread ${LibMagic_LIBRARY} ${LIBXML2_LIBRARIES}
+ ${Readline_LIBRARY} ${ILBC_LIBRARIES} ${SPEEX_LIBRARIES} ${ZRTPCPP_LIBRARIES}
+ ${CCRTP_LIBRARIES} ${COMMONCPP_LIBRARIES} ${UCOMMON_LIBRARIES} ${LIBSNDFILE_LIBRARY})
+
+
diff --git a/src/audio/CMakeLists.txt b/src/audio/CMakeLists.txt
new file mode 100644
index 0000000..56fcc4f
--- /dev/null
+++ b/src/audio/CMakeLists.txt
@@ -0,0 +1,26 @@
+project(libtwinkle-audio)
+
+set(LIBTWINKLE_AUDIO-SRCS
+ audio_device.cpp
+ audio_decoder.cpp
+ audio_encoder.cpp
+ audio_codecs.cpp
+ audio_rx.cpp
+ audio_session.cpp
+ audio_tx.cpp
+ dtmf_player.cpp
+ freq_gen.cpp
+ g711.cpp
+ g721.cpp
+ g723_16.cpp
+ g723_24.cpp
+ g723_40.cpp
+ g72x.cpp
+ media_buffer.cpp
+ rtp_telephone_event.cpp
+ tone_gen.cpp
+ twinkle_rtp_session.cpp
+ twinkle_zrtp_ui.cpp
+)
+
+add_library(libtwinkle-audio OBJECT ${LIBTWINKLE_AUDIO-SRCS})
diff --git a/src/audio/gsm/src/CMakeLists.txt b/src/audio/gsm/src/CMakeLists.txt
new file mode 100644
index 0000000..15789fd
--- /dev/null
+++ b/src/audio/gsm/src/CMakeLists.txt
@@ -0,0 +1,26 @@
+project(libtwinkle-gsm)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../inc)
+
+set(LIBTWINKLE_GSM-SRCS
+ add.cpp
+ code.cpp
+ debug.cpp
+ decode.cpp
+ gsm_create.cpp
+ gsm_decode.cpp
+ gsm_destroy.cpp
+ gsm_encode.cpp
+ gsm_explode.cpp
+ gsm_implode.cpp
+ gsm_option.cpp
+ gsm_print.cpp
+ long_term.cpp
+ lpc.cpp
+ preprocess.cpp
+ rpe.cpp
+ short_term.cpp
+ table.cpp
+)
+
+add_library(libtwinkle-gsm OBJECT ${LIBTWINKLE_GSM-SRCS})
diff --git a/src/audits/CMakeLists.txt b/src/audits/CMakeLists.txt
new file mode 100644
index 0000000..a1ef0e5
--- /dev/null
+++ b/src/audits/CMakeLists.txt
@@ -0,0 +1,7 @@
+project(libtwinkle-audits)
+
+set(LIBTWINKLE_AUDITS-SRCS
+ memman.cpp
+)
+
+add_library(libtwinkle-audits OBJECT ${LIBTWINKLE_AUDITS-SRCS})
diff --git a/src/im/CMakeLists.txt b/src/im/CMakeLists.txt
new file mode 100644
index 0000000..ce4246c
--- /dev/null
+++ b/src/im/CMakeLists.txt
@@ -0,0 +1,8 @@
+project(libtwinkle-im)
+
+set(LIBTWINKLE_IM-SRCS
+ im_iscomposing_body.cpp
+ msg_session.cpp
+)
+
+add_library(libtwinkle-im OBJECT ${LIBTWINKLE_IM-SRCS})
diff --git a/src/mwi/CMakeLists.txt b/src/mwi/CMakeLists.txt
new file mode 100644
index 0000000..b43c448
--- /dev/null
+++ b/src/mwi/CMakeLists.txt
@@ -0,0 +1,10 @@
+project(libtwinkle-mwi)
+
+set(LIBTWINKLE_MWI-SRCS
+ mwi.cpp
+ mwi_dialog.cpp
+ mwi_subscription.cpp
+ simple_msg_sum_body.cpp
+)
+
+add_library(libtwinkle-mwi OBJECT ${LIBTWINKLE_MWI-SRCS})
diff --git a/src/parser/CMakeLists.txt b/src/parser/CMakeLists.txt
new file mode 100644
index 0000000..7392df9
--- /dev/null
+++ b/src/parser/CMakeLists.txt
@@ -0,0 +1,84 @@
+project(libtwinkle-parser)
+
+set(LIBTWINKLE_PARSER-SRCS
+ challenge.cpp
+ coding.cpp
+ credentials.cpp
+ definitions.cpp
+ hdr_accept.cpp
+ hdr_accept_encoding.cpp
+ hdr_accept_language.cpp
+ hdr_alert_info.cpp
+ hdr_allow.cpp
+ hdr_allow_events.cpp
+ hdr_auth_info.cpp
+ hdr_authorization.cpp
+ hdr_call_id.cpp
+ hdr_call_info.cpp
+ hdr_contact.cpp
+ hdr_content_disp.cpp
+ hdr_content_encoding.cpp
+ hdr_content_language.cpp
+ hdr_content_length.cpp
+ hdr_content_type.cpp
+ hdr_cseq.cpp
+ hdr_date.cpp
+ hdr_error_info.cpp
+ hdr_event.cpp
+ hdr_expires.cpp
+ hdr_from.cpp
+ hdr_in_reply_to.cpp
+ hdr_max_forwards.cpp
+ hdr_min_expires.cpp
+ hdr_mime_version.cpp
+ hdr_organization.cpp
+ hdr_priority.cpp
+ hdr_privacy.cpp
+ hdr_p_asserted_identity.cpp
+ hdr_p_preferred_identity.cpp
+ hdr_proxy_authenticate.cpp
+ hdr_proxy_authorization.cpp
+ hdr_proxy_require.cpp
+ hdr_rack.cpp
+ hdr_record_route.cpp
+ hdr_refer_sub.cpp
+ hdr_refer_to.cpp
+ hdr_referred_by.cpp
+ hdr_replaces.cpp
+ hdr_reply_to.cpp
+ hdr_require.cpp
+ hdr_request_disposition.cpp
+ hdr_retry_after.cpp
+ hdr_route.cpp
+ hdr_rseq.cpp
+ hdr_server.cpp
+ hdr_service_route.cpp
+ hdr_sip_etag.cpp
+ hdr_sip_if_match.cpp
+ hdr_subject.cpp
+ hdr_subscription_state.cpp
+ hdr_supported.cpp
+ hdr_timestamp.cpp
+ hdr_to.cpp
+ hdr_unsupported.cpp
+ hdr_user_agent.cpp
+ hdr_via.cpp
+ hdr_warning.cpp
+ hdr_www_authenticate.cpp
+ header.cpp
+ identity.cpp
+ media_type.cpp
+ milenage.cpp
+ parameter.cpp
+ parse_ctrl.cpp
+ parser.cxx
+ request.cpp
+ response.cpp
+ rijndael.cpp
+ route.cpp
+ scanner.cxx
+ sip_body.cpp
+ sip_message.cpp
+)
+
+add_library(libtwinkle-parser OBJECT ${LIBTWINKLE_PARSER-SRCS})
diff --git a/src/patterns/CMakeLists.txt b/src/patterns/CMakeLists.txt
new file mode 100644
index 0000000..df6bde7
--- /dev/null
+++ b/src/patterns/CMakeLists.txt
@@ -0,0 +1,7 @@
+project(libtwinkle-patterns)
+
+set(LIBTWINKLE_PATTERNS-SRCS
+ observer.cpp
+)
+
+add_library(libtwinkle-patterns OBJECT ${LIBTWINKLE_PATTERNS-SRCS})
diff --git a/src/presence/CMakeLists.txt b/src/presence/CMakeLists.txt
new file mode 100644
index 0000000..69068ee
--- /dev/null
+++ b/src/presence/CMakeLists.txt
@@ -0,0 +1,12 @@
+project(libtwinkle-presence)
+
+set(LIBTWINKLE_PRESENCE-SRCS
+ buddy.cpp
+ pidf_body.cpp
+ presence_dialog.cpp
+ presence_epa.cpp
+ presence_state.cpp
+ presence_subscription.cpp
+)
+
+add_library(libtwinkle-presence OBJECT ${LIBTWINKLE_PRESENCE-SRCS})
diff --git a/src/sdp/CMakeLists.txt b/src/sdp/CMakeLists.txt
new file mode 100644
index 0000000..15cb9d2
--- /dev/null
+++ b/src/sdp/CMakeLists.txt
@@ -0,0 +1,13 @@
+project(libtwinkle-sdp)
+
+#BISON_TARGET(MyParser migcom.tproj/parser.y ${CMAKE_CURRENT_BINARY_DIR}/parser.c)
+#FLEX_TARGET(MyScanner migcom.tproj/lexxer.l ${CMAKE_CURRENT_BINARY_DIR}/lexer.c)
+#ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser)
+
+set(LIBTWINKLE_SDP-SRCS
+ sdp.cpp
+ sdp_parse_ctrl.cpp
+ sdp_scanner.cxx
+)
+
+add_library(libtwinkle-sdp OBJECT ${LIBTWINKLE_SDP-SRCS})
diff --git a/src/sockets/CMakeLists.txt b/src/sockets/CMakeLists.txt
new file mode 100644
index 0000000..a940b40
--- /dev/null
+++ b/src/sockets/CMakeLists.txt
@@ -0,0 +1,12 @@
+project(libtwinkle-sockets)
+
+set(LIBTWINKLE_SOCKETS-SRCS
+ connection.cpp
+ connection_table.cpp
+ dnssrv.cpp
+ interfaces.cpp
+ socket.cpp
+ url.cpp
+)
+
+add_library(libtwinkle-sockets OBJECT ${LIBTWINKLE_SOCKETS-SRCS})
diff --git a/src/sockets/socket.cpp b/src/sockets/socket.cpp
index 87bdc27..a56d273 100644
--- a/src/sockets/socket.cpp
+++ b/src/sockets/socket.cpp
@@ -24,15 +24,15 @@
#include "socket.h"
#include "audits/memman.h"
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#if HAVE_LINUX_TYPES_H
+#ifdef HAVE_LINUX_TYPES_H
#include <linux/types.h>
#endif
-#if HAVE_LINUX_ERRQUEUE_H
+#ifdef HAVE_LINUX_ERRQUEUE_H
#include <linux/errqueue.h>
#endif
@@ -185,7 +185,7 @@ bool t_socket_udp::select_read(unsigned long timeout) {
}
bool t_socket_udp::enable_icmp(void) {
-#if HAVE_LINUX_ERRQUEUE_H
+#ifdef HAVE_LINUX_ERRQUEUE_H
int enable = 1;
int ret = setsockopt(SOL_IP, IP_RECVERR, &enable, sizeof(int));
if (ret < 0) return false;
@@ -196,7 +196,7 @@ bool t_socket_udp::enable_icmp(void) {
}
bool t_socket_udp::get_icmp(t_icmp_msg &icmp) {
-#if HAVE_LINUX_ERRQUEUE_H
+#ifdef HAVE_LINUX_ERRQUEUE_H
int ret;
char buf[256];
diff --git a/src/stun/CMakeLists.txt b/src/stun/CMakeLists.txt
new file mode 100644
index 0000000..dabf6ba
--- /dev/null
+++ b/src/stun/CMakeLists.txt
@@ -0,0 +1,9 @@
+project(libtwinkle-stun)
+
+set(LIBTWINKLE_STUN-SRCS
+ stun.cxx
+ stun_transaction.cpp
+ udp.cxx
+)
+
+add_library(libtwinkle-stun OBJECT ${LIBTWINKLE_STUN-SRCS})
diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt
new file mode 100644
index 0000000..2fc7de9
--- /dev/null
+++ b/src/threads/CMakeLists.txt
@@ -0,0 +1,9 @@
+project(libtwinkle-threads)
+
+set(LIBTWINKLE_THREADS-SRCS
+ thread.cpp
+ mutex.cpp
+ sema.cpp
+)
+
+add_library(libtwinkle-threads OBJECT ${LIBTWINKLE_THREADS-SRCS})
diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt
new file mode 100644
index 0000000..8e347b7
--- /dev/null
+++ b/src/utils/CMakeLists.txt
@@ -0,0 +1,8 @@
+project(libtwinkle-utils)
+
+set(LIBTWINKLE_UTILS-SRCS
+ file_utils.cpp
+ mime_database.cpp
+)
+
+add_library(libtwinkle-utils OBJECT ${LIBTWINKLE_UTILS-SRCS})
diff --git a/twinkle_config.h.in b/twinkle_config.h.in
new file mode 100644
index 0000000..3daa7ae
--- /dev/null
+++ b/twinkle_config.h.in
@@ -0,0 +1,12 @@
+#cmakedefine WITH_SPEEX
+#cmakedefine WITH_ILBC
+#cmakedefine WITH_ZRTP
+
+#cmakedefine HAVE_UNISTD_H
+#cmakedefine HAVE_LINUX_TYPES_H
+#cmakedefine HAVE_LINUX_ERRQUEUE_H
+
+#define VERSION "${PRODUCT_VERSION}"
+#define VERSION_DATE "${PRODUCT_DATE}"
+
+#define DATADIR "${CMAKE_INSTALL_PREFIX}/share/twinkle"