From 4423e9c3d3a1894359d11ba6097b5cc1aa49ad91 Mon Sep 17 00:00:00 2001 From: Lubos Dolezel Date: Mon, 1 Jun 2015 21:08:01 +0200 Subject: Console CMake build now complete --- CMakeLists.txt | 18 +++++- cmake/FindUcommon.cmake | 2 +- src/CMakeLists.txt | 5 +- src/parser/CMakeLists.txt | 148 ++++++++++++++++++++++++---------------------- src/sdp/CMakeLists.txt | 14 +++-- 5 files changed, 107 insertions(+), 80 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ccb7cd..b134e85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,8 +18,9 @@ find_package(ALSA REQUIRED) find_package(LibMagic REQUIRED) find_package(LibSndfile REQUIRED) find_package(Readline REQUIRED) -#find_package(BISON) -#find_package(FLEX) +find_package(BISON REQUIRED) +find_package(FLEX REQUIRED) +find_package(Boost REQUIRED COMPONENTS regex) include_directories(${LIBXML2_INCLUDE_DIR}) @@ -102,4 +103,17 @@ check_include_file(linux/errqueue.h HAVE_LINUX_ERRQUEUE_H) configure_file(twinkle_config.h.in twinkle_config.h) include_directories("${CMAKE_BINARY_DIR}") +install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/data/providers.csv + ${CMAKE_CURRENT_SOURCE_DIR}/data/ringtone.wav + ${CMAKE_CURRENT_SOURCE_DIR}/data/ringback.wav + ${CMAKE_CURRENT_SOURCE_DIR}/src/gui/images/twinkle16.png + ${CMAKE_CURRENT_SOURCE_DIR}/src/gui/images/twinkle32.png + ${CMAKE_CURRENT_SOURCE_DIR}/src/gui/images/twinkle48.png + DESTINATION share/twinkle) +install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/src/gui/images/twinkle48.png + DESTINATION share/pixmaps + RENAME twinkle.png) + add_subdirectory(src) diff --git a/cmake/FindUcommon.cmake b/cmake/FindUcommon.cmake index a61257b..75dd53c 100644 --- a/cmake/FindUcommon.cmake +++ b/cmake/FindUcommon.cmake @@ -5,7 +5,7 @@ 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) +ENDIF(UCOMMON_INCLUDE_DIR AND UCOMMON_LIBRARIES AND USECURE_LIBRARIES) IF(UCOMMON_FOUND) IF (NOT Ucommon_FIND_QUIETLY) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8d43f3c..9bed19e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -72,6 +72,9 @@ add_executable(twinkle target_link_libraries(twinkle -lpthread -lresolv ${LibMagic_LIBRARY} ${LIBXML2_LIBRARIES} ${Readline_LIBRARY} ${ILBC_LIBRARIES} ${SPEEX_LIBRARIES} ${ZRTPCPP_LIBRARIES} - ${CCRTP_LIBRARIES} ${COMMONCPP_LIBRARIES} ${UCOMMON_LIBRARIES} ${LIBSNDFILE_LIBRARY}) + ${CCRTP_LIBRARIES} ${COMMONCPP_LIBRARIES} ${UCOMMON_LIBRARIES} ${LIBSNDFILE_LIBRARY} + ${Boost_LIBRARIES}) + +install(TARGETS twinkle DESTINATION bin) diff --git a/src/parser/CMakeLists.txt b/src/parser/CMakeLists.txt index 7392df9..c479a77 100644 --- a/src/parser/CMakeLists.txt +++ b/src/parser/CMakeLists.txt @@ -1,84 +1,90 @@ project(libtwinkle-parser) +BISON_TARGET(MyParser parser.yxx ${CMAKE_CURRENT_BINARY_DIR}/parser.cxx) +FLEX_TARGET(MyScanner scanner.lxx ${CMAKE_CURRENT_BINARY_DIR}/scanner.cxx) +ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + 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 + 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_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_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_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 + 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 + ${CMAKE_CURRENT_BINARY_DIR}/parser.cxx + request.cpp + response.cpp + rijndael.cpp + route.cpp + ${CMAKE_CURRENT_BINARY_DIR}/scanner.cxx + sip_body.cpp + sip_message.cpp ) add_library(libtwinkle-parser OBJECT ${LIBTWINKLE_PARSER-SRCS}) diff --git a/src/sdp/CMakeLists.txt b/src/sdp/CMakeLists.txt index 15cb9d2..5cefc2a 100644 --- a/src/sdp/CMakeLists.txt +++ b/src/sdp/CMakeLists.txt @@ -1,13 +1,17 @@ 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) +BISON_TARGET(MyParser sdp_parser.yxx ${CMAKE_CURRENT_BINARY_DIR}/sdp_parser.cxx COMPILE_FLAGS "-p yysdp") +FLEX_TARGET(MyScanner sdp_scanner.lxx ${CMAKE_CURRENT_BINARY_DIR}/sdp_scanner.cxx COMPILE_FLAGS "-Pyysdp") +ADD_FLEX_BISON_DEPENDENCY(MyScanner MyParser) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) set(LIBTWINKLE_SDP-SRCS sdp.cpp - sdp_parse_ctrl.cpp - sdp_scanner.cxx + sdp_parse_ctrl.cpp + ${CMAKE_CURRENT_BINARY_DIR}/sdp_parser.cxx + ${CMAKE_CURRENT_BINARY_DIR}/sdp_scanner.cxx + sdp_scanner.cxx ) add_library(libtwinkle-sdp OBJECT ${LIBTWINKLE_SDP-SRCS}) -- cgit v1.2.3