CMakeLists.txt 2.86 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
############################################################################
# CMakeLists.txt
# Copyright (C) 2014  Belledonne Communications, Grenoble France
#
############################################################################
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 21 22
#
############################################################################

23 24 25 26 27 28 29 30 31 32
if(ENABLE_ROOTCA_DOWNLOAD)
	if(APPLE)
		find_program(OPENSSL_PROGRAM openssl)
		execute_process(
			COMMAND ${OPENSSL_PROGRAM} version -d
			OUTPUT_VARIABLE OPENSSL_VERSION
			OUTPUT_STRIP_TRAILING_WHITESPACE
		)
		string(REGEX REPLACE "OPENSSLDIR: \"(.*)\"" "\\1" HTTPS_CA_DIR "${OPENSSL_VERSION}")
	endif()
33

34 35 36 37
	set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/rootca.pem PROPERTIES GENERATED TRUE)
	add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem
		COMMAND ${CMAKE_COMMAND} -DHTTPS_CA_DIR=${HTTPS_CA_DIR} -DWORK_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DOUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/rootca.cmake)
	add_custom_target(rootca ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem)
38

39 40 41 42 43
	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rootca.pem
		DESTINATION ${PACKAGE_DATA_DIR}/linphone
		PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
	)
endif()
44

45 46 47 48 49 50 51 52 53
set(GRAMMAR_FILES
	cpim_grammar
)

install(FILES ${GRAMMAR_FILES}
	DESTINATION ${PACKAGE_GRAMMAR_DIR}
	PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)

54 55 56 57 58
set(SOUND_FILES
	hello16000.wav
	hello8000.wav
	incoming_chat.wav
	ringback.wav
59 60
	dont_wait_too_long.mkv
	toy-mono.wav
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
)

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()
83 84

add_subdirectory(rings)