Commit bd7a6b2f authored by Ghislain MARY's avatar Ghislain MARY

Improve build with CMake.

 - Install the GTK UI binary under the name linphone instead of linphone-gtk.
 - Install all sounds and rings.
 - Install freedesktop files.
parent ff42eeab
......@@ -136,6 +136,8 @@ set(LINPHONE_PLUGINS_DIR "${LINPHONE_DATA_DIR}/lib/liblinphone/plugins")
set(PACKAGE_LOCALE_DIR "${LINPHONE_DATA_DIR}/share/locale")
set(PACKAGE_DATA_DIR "${LINPHONE_DATA_DIR}/share")
set(PACKAGE_SOUND_DIR "${LINPHONE_DATA_DIR}/share/sounds/linphone")
set(PACKAGE_RING_DIR "${PACKAGE_SOUND_DIR}/rings")
set(PACKAGE_FREEDESKTOP_DIR "${PACKAGE_DATA_DIR}/applications")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/config.h PROPERTIES GENERATED ON)
add_definitions(-DHAVE_CONFIG_H)
......
......@@ -66,6 +66,7 @@ set(SOURCE_FILES
)
add_executable(linphone-gtk ${SOURCE_FILES})
set_target_properties(linphone-gtk PROPERTIES OUTPUT_NAME linphone)
target_include_directories(linphone-gtk PUBLIC ${GTK2_INCLUDE_DIRS})
target_link_libraries(linphone-gtk linphone ${GTK2_LIBRARIES})
......
......@@ -21,12 +21,37 @@
############################################################################
install(FILES archived-rootca.pem
RENAME rootca.pem
DESTINATION share/linphone
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
RENAME rootca.pem
DESTINATION ${PACKAGE_DATA_DIR}/linphone
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
install(FILES ringback.wav
DESTINATION share/sounds/linphone
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
set(SOUND_FILES
hello16000.wav
hello8000.wav
incoming_chat.wav
ringback.wav
)
install(FILES ${SOUND_FILES}
DESTINATION ${PACKAGE_SOUND_DIR}
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
if(ENABLE_GTK_UI)
set(prefix "${CMAKE_INSTALL_PREFIX}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/audio-assistant.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/audio-assistant.desktop)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/linphone.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/linphone.desktop)
set(FREEDESKTOP_FILES
${CMAKE_CURRENT_BINARY_DIR}/audio-assistant.desktop
${CMAKE_CURRENT_BINARY_DIR}/linphone.desktop
)
install(FILES ${FREEDESKTOP_FILES}
DESTINATION ${PACKAGE_FREEDESKTOP_DIR}
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
endif()
add_subdirectory(rings)
......@@ -6,6 +6,6 @@ Comment[fr]=Assistant audio de Linphone.
Comment[ru]=Помощник аудио Linphone
Type=Application
Exec=linphone --run-audio-assistant
Icon=/usr/local/share/pixmaps/linphone/linphone.png
Icon=@prefix@/share/pixmaps/linphone/linphone.png
Terminal=false
Categories=Network;Telephony;
\ No newline at end of file
......@@ -20,7 +20,20 @@
#
############################################################################
install(FILES oldphone.wav toy-mono.wav
COMPONENT COMP_liblinphone
DESTINATION share/sounds/linphone/rings
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)
set(RING_FILES
bigben.wav
oldphone-mono-30s.caf
oldphone-mono.wav
oldphone.wav
orig.wav
rock.wav
sweet.wav
synth.wav
tapping.wav
toy-mono.wav
)
install(FILES ${RING_FILES}
DESTINATION ${PACKAGE_RING_DIR}
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
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