CMakeLists.txt 3.82 KB
Newer Older
1
################################################################################
2
# CMakeLists.txt
3
# Copyright (C) 2017  Belledonne Communications, Grenoble France
4
#
5
################################################################################
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#
# 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
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#
21
################################################################################
22

23
set(ROOT_HEADER_FILES
24
	account_creator_service.h
25
	account_creator.h
26
	auth_info.h
27 28 29 30
	buffer.h
	call_log.h
	call_params.h
	call_stats.h
31 32
	call.h
	callbacks.h
Ghislain MARY's avatar
Ghislain MARY committed
33
	chat.h
34
	conference.h
Ghislain MARY's avatar
Ghislain MARY committed
35
	contactprovider.h
36 37
	content.h
	core_utils.h
38
	core.h
39
	defs.h
40
	dictionary.h
41
	error_info.h
42
	event.h
43
	factory.h
44 45
	friend.h
	friendlist.h
46
	headers.h
47
	im_encryption_engine.h
48
	im_notif_policy.h
49
	info_message.h
Ghislain MARY's avatar
Ghislain MARY committed
50
	ldapprovider.h
51
	lpconfig.h
52
	misc.h
53
	nat_policy.h
54 55
	payload_type.h
	player.h
56 57
	presence.h
	proxy_config.h
58
	ringtoneplayer.h
59 60
	sipsetup.h
	tunnel.h
61
	types.h
62
	vcard.h
63
	video_definition.h
64
	wrapper_utils.h
65
	xmlrpc.h
66 67

	# Deprecated header files
68 69
	linphone_proxy_config.h
	linphone_tunnel.h
70
	linphonecore_utils.h
71
	linphonecore.h
72 73 74 75
	linphonefriend.h
	linphonepresence.h
)

76 77 78
set(C_API_HEADER_FILES
	c-address.h
	c-api.h
79 80
	c-call-cbs.h
	c-call-stats.h
81
	c-call.h
82
	c-callbacks.h
83
	c-chat-message-cbs.h
84
	c-chat-message.h
85
	c-chat-room-cbs.h
86
	c-chat-room.h
87
	c-dial-plan.h
88
	c-event-log.h
Erwan Croze's avatar
Erwan Croze committed
89
	c-magic-search.h
90
	c-participant.h
Erwan Croze's avatar
Erwan Croze committed
91
	c-search-result.h
92 93 94 95
	c-types.h
)

set(ENUMS_HEADER_FILES
96
	call-enums.h
97
	chat-message-enums.h
98
	chat-room-enums.h
99 100 101 102
	event-log-enums.h
)

set(UTILS_HEADER_FILES
103
	algorithm.h
104
	enum-generator.h
105
	enum-mask.h
106
	fs.h
107 108
	general.h
	magic-macros.h
109
	traits.h
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
	utils.h
)

# ------------------------------------------------------------------------------

function (PREPEND OUT_LIST PREFIX)
	set(TMP_LIST )
	foreach (FILENAME ${ARGN})
		list(APPEND TMP_LIST "${PREFIX}/${FILENAME}")
	endforeach ()
	set(${OUT_LIST} "${TMP_LIST}" PARENT_SCOPE)
endfunction ()

# ------------------------------------------------------------------------------

set(SRC_ROOT_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/linphone")

PREPEND(ROOT_HEADER_FILES "${SRC_ROOT_DIRECTORY}" ${ROOT_HEADER_FILES})
PREPEND(C_API_HEADER_FILES "${SRC_ROOT_DIRECTORY}/api" ${C_API_HEADER_FILES})
PREPEND(ENUMS_HEADER_FILES "${SRC_ROOT_DIRECTORY}/enums" ${ENUMS_HEADER_FILES})
PREPEND(UTILS_HEADER_FILES "${SRC_ROOT_DIRECTORY}/utils" ${UTILS_HEADER_FILES})

set(LINPHONE_HEADER_FILES ${ROOT_HEADER_FILES} ${C_API_HEADER_FILES} ${ENUMS_HEADER_FILES} ${UTILS_HEADER_FILES} PARENT_SCOPE)
133
set(LINPHONE_HEADER_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" PARENT_SCOPE)
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151

# ------------------------------------------------------------------------------

set(DEST_ROOT_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}/linphone")

install(FILES ${ROOT_HEADER_FILES}
	DESTINATION "${DEST_ROOT_DIRECTORY}"
	PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)

install(FILES ${C_API_HEADER_FILES}
	DESTINATION "${DEST_ROOT_DIRECTORY}/api"
	PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
install(FILES ${ENUMS_HEADER_FILES}
	DESTINATION "${DEST_ROOT_DIRECTORY}/enums"
	PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
152

153 154
install(FILES ${UTILS_HEADER_FILES}
	DESTINATION "${DEST_ROOT_DIRECTORY}/utils"
155 156
	PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)