CMakeLists.txt 4.21 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 27 28 29
	buffer.h
	call_log.h
	call_params.h
	call_stats.h
30 31
	call.h
	callbacks.h
Ghislain MARY's avatar
Ghislain MARY committed
32
	chat.h
33
	conference.h
Ghislain MARY's avatar
Ghislain MARY committed
34
	contactprovider.h
35
	core_utils.h
36
	core.h
37
	defs.h
38
	dictionary.h
39
	error_info.h
40
	event.h
41
	factory.h
42 43
	friend.h
	friendlist.h
44
	headers.h
45
	im_encryption_engine.h
46
	im_notif_policy.h
47
	info_message.h
Ghislain MARY's avatar
Ghislain MARY committed
48
	ldapprovider.h
49
	logging.h
50
	lpconfig.h
51
	misc.h
52
	nat_policy.h
53 54
	payload_type.h
	player.h
55 56
	presence.h
	proxy_config.h
57
	ringtoneplayer.h
58 59
	sipsetup.h
	tunnel.h
60
	types.h
61
	vcard.h
62
	video_definition.h
63
	wrapper_utils.h
64
	xmlrpc.h
65 66

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

75 76
set(C_API_HEADER_FILES
	c-address.h
rosset claire's avatar
rosset claire committed
77
	c-auth-info.h
78
	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-chat-room-params.h
88
	c-content.h
89
	c-dial-plan.h
90
	c-event-log.h
Erwan Croze's avatar
Erwan Croze committed
91
	c-magic-search.h
92
	c-participant.h
93
	c-participant-device.h
94
	c-participant-device-identity.h
95
	c-participant-imdn-state.h
Erwan Croze's avatar
Erwan Croze committed
96
	c-search-result.h
97 98 99 100
	c-types.h
)

set(ENUMS_HEADER_FILES
101
	call-enums.h
102
	chat-message-enums.h
103
	chat-room-enums.h
104
	encryption-engine-enums.h
105
	event-log-enums.h
106
	security-event-enums.h
107 108 109
)

set(UTILS_HEADER_FILES
110
	algorithm.h
111
	enum-generator.h
112
	enum-mask.h
113
	fs.h
114 115
	general.h
	magic-macros.h
116
	traits.h
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
	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)
140
set(LINPHONE_HEADER_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" PARENT_SCOPE)
141 142

# ------------------------------------------------------------------------------
143
if (APPLE AND ENABLE_SHARED)
144 145 146 147 148
	#cmake 3.10 seems not able to handle subdirectories for PUBLIC_HEADER. My be rework in the futur
	set(DEST_ROOT_DIRECTORY "${CMAKE_INSTALL_PREFIX}/Frameworks/linphone.framework/Headers")
else()
	set(DEST_ROOT_DIRECTORY "${CMAKE_INSTALL_INCLUDEDIR}/linphone")
endif()
149 150 151 152 153 154 155 156 157 158 159 160 161 162

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
)
163

164 165
install(FILES ${UTILS_HEADER_FILES}
	DESTINATION "${DEST_ROOT_DIRECTORY}/utils"
166 167
	PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)