Commit c7e7d89f authored by Ghislain MARY's avatar Ghislain MARY

Install tester when building with CMake.

parent f784c8d9
......@@ -189,17 +189,6 @@ if(BELCARD_FOUND AND APPLE)
set(LINPHONE_LDFLAGS "${LINPHONE_LDFLAGS} -stdlib=libc++")
endif()
set(OTHER_LIBS_FOR_TESTER ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES} ${XML2_LIBRARIES})
if(INTL_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${INTL_LIBRARIES})
endif()
if(SQLITE3_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${SQLITE3_LIBRARIES})
endif()
if(ZLIB_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${ZLIB_LIBRARIES})
endif()
# include_directories must be called only UNDER THIS LINE in order to use our
# projects submodules first (we do NOT want to have system headers in first position)
include_directories(
......
......@@ -20,17 +20,114 @@
#
############################################################################
set(OTHER_LIBS_FOR_TESTER ${BCTOOLBOX_LIBRARIES} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES} ${BELLESIP_LIBRARIES} ${XML2_LIBRARIES})
if(INTL_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${INTL_LIBRARIES})
endif()
if(SQLITE3_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${SQLITE3_LIBRARIES})
endif()
if(ZLIB_FOUND)
list(APPEND OTHER_LIBS_FOR_TESTER ${ZLIB_LIBRARIES})
endif()
set(SOUND_FILES
sounds/ahbahouaismaisbon.wav
sounds/hello44100.wav
sounds/hello8000.mkv
sounds/hello8000_mkv_ref.wav
sounds/hello8000.wav
sounds/oldphone.wav
sounds/ringback.wav
sounds/sintel_trailer_opus_h264.mkv
sounds/sintel_trailer_opus_vp8.mkv
sounds/sintel_trailer_pcmu_h264.mkv
sounds/vrroom.wav
)
set(SIPP_FILES
sipp/call_invite_200ok_without_contact_header.xml
sipp/call_with_audio_mline_before_video_in_sdp.xml
sipp/call_with_multiple_audio_mline_in_sdp.xml
sipp/call_with_multiple_video_mline_in_sdp.xml
sipp/call_with_video_mline_before_audio_in_sdp.xml
sipp/sip_update_within_icoming_reinvite_with_no_sdp.xml
)
set(CERTIFICATE_ALT_FILES
certificates/altname/agent.pem
certificates/altname/cafile.pem
certificates/altname/openssl-altname.cnf
)
set(CERTIFICATE_CN_FILES
certificates/cn/agent.pem
certificates/cn/cafile.pem
certificates/cn/openssl-cn.cnf
)
set(CERTIFICATE_FILES ${CERTIFICATE_ALT_FILES} ${CERTIFICATE_CN_FILES})
set(RC_FILES
rcfiles/carddav_rc
rcfiles/empty_rc
rcfiles/friends_rc
rcfiles/laure_call_logs_rc
rcfiles/laure_rc_udp
rcfiles/marie_early_rc
rcfiles/marie_h264_rc
rcfiles/marie_quality_reporting_rc
rcfiles/marie_rc
rcfiles/marie_rc_rtcp_xr
rcfiles/marie_remote_404_rc
rcfiles/marie_remote_default_values_rc
rcfiles/marie_remote_https_rc
rcfiles/marie_remote_invalid_rc
rcfiles/marie_remote_invalid_uri_rc
rcfiles/marie_remote_localfile2_rc
rcfiles/marie_remote_localfile_android_rc
rcfiles/marie_remote_localfile_rc
rcfiles/marie_remote_localfile_win10_rc
rcfiles/marie_remote_rc
rcfiles/marie_sips_rc
rcfiles/marie_transient_remote_rc
rcfiles/marie_zrtp_aes256_rc
rcfiles/marie_zrtp_b256_rc
rcfiles/marie_zrtp_srtpsuite_aes256_rc
rcfiles/michelle_rc_udp
rcfiles/multi_account_rc
rcfiles/pauline_alt_rc
rcfiles/pauline_h264_rc
rcfiles/pauline_rc
rcfiles/pauline_rc_rtcp_xr
rcfiles/pauline_sips_rc
rcfiles/pauline_tcp_rc
rcfiles/pauline_wild_rc
rcfiles/pauline_zrtp_aes256_rc
rcfiles/pauline_zrtp_b256_rc
rcfiles/pauline_zrtp_srtpsuite_aes256_rc
rcfiles/remote_zero_length_params_rc
rcfiles/stun_rc
rcfiles/upnp_rc
rcfiles/zero_length_params_rc
)
set(IMAGE_FILES images/nowebcamCIF.jpg)
set(VCARD_FILES
vcards/thousand_vcards.vcf
vcards/vcards.vcf
)
set(RESOURCES_FILES
certificates
flexisip
images
local_tester_hosts
messages.db
rcfiles
sipp
sounds
tester_hosts
vcards
messages.db
${SOUND_FILES}
${SIPP_FILES}
${CERTIFICATE_FILES}
${RC_FILES}
${IMAGE_FILES}
${VCARD_FILES}
)
set(SOURCE_FILES_C
......@@ -166,4 +263,20 @@ if (NOT ANDROID AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
target_link_libraries(liblinphone_tester ${GTKMACINTEGRATION_LIBRARIES})
endif()
endif()
install(TARGETS liblinphone_tester
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
if(NOT IOS)
install(FILES ${SOUND_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/sounds")
install(FILES ${SIPP_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/sipp")
install(FILES ${CERTIFICATE_ALT_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/certificates/altname")
install(FILES ${CERTIFICATE_CN_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/certificates/cn")
install(FILES ${RC_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/rcfiles")
install(FILES ${IMAGE_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/images")
install(FILES ${VCARD_FILES} DESTINATION "${CMAKE_INSTALL_DATADIR}/liblinphone_tester/vcards")
endif()
endif()
......@@ -52,13 +52,13 @@ target_link_libraries(lp-gen-wrappers ${LP_GEN_WRAPPERS_LIBS})
set(LP_AUTO_ANSWER_SOURCE_FILES auto_answer.c)
apply_compile_flags(LP_AUTO_ANSWER_SOURCE_FILES "CPP" "C")
add_executable(lp-auto-answer ${USE_BUNDLE} ${LP_AUTO_ANSWER_SOURCE_FILES})
target_link_libraries(lp-auto-answer ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER})
target_link_libraries(lp-auto-answer ${LINPHONE_LIBS_FOR_TOOLS} ${MEDIASTREAMER2_LIBRARIES})
set_target_properties(lp-auto-answer PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
set(LP_SENDMSG_SOURCE_FILES lpsendmsg.c)
apply_compile_flags(LP_SENDMSG_SOURCE_FILES "CPP" "C")
add_executable(lp-sendmsg ${USE_BUNDLE} ${LP_SENDMSG_SOURCE_FILES})
target_link_libraries(lp-sendmsg ${LINPHONE_LIBS_FOR_TOOLS} ${OTHER_LIBS_FOR_TESTER})
target_link_libraries(lp-sendmsg ${LINPHONE_LIBS_FOR_TOOLS} ${ORTP_LIBRARIES} ${MEDIASTREAMER2_LIBRARIES})
set_target_properties(lp-sendmsg PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
if (NOT IOS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment