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

Ghislain MARY's avatar
Ghislain MARY committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
set(LIBS
	${BCTOOLBOX_CORE_LIBRARIES}
	${BELLESIP_LIBRARIES}
	${MEDIASTREAMER2_LIBRARIES}
	${ORTP_LIBRARIES}
	${XML2_LIBRARIES}
	${BELR_LIBRARIES}
	${LIBXSD_LIBRARIES}
)
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
	list(APPEND LIBS "Ws2_32")
endif()
if(ENABLE_LIME)
	list(APPEND LIBS ${BZRTP_LIBRARIES})
endif()
if(ZLIB_FOUND)
	list(APPEND LIBS ${ZLIB_LIBRARIES})
endif()
if(SOCI_FOUND)
	list(APPEND LIBS ${SOCI_LIBRARIES})
endif()
if(SQLITE3_FOUND)
	list(APPEND LIBS ${SQLITE3_LIBRARIES})
endif()
if(ICONV_FOUND)
	list(APPEND LIBS ${ICONV_LIBRARIES})
endif()
if(ENABLE_TUNNEL)
	list(APPEND LIBS ${TUNNEL_LIBRARIES})
endif()
if(MSVC AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
	list(APPEND LIBS ${LIBGCC} ${LIBMINGWEX})
endif()
if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
	list(APPEND LIBS shlwapi)
endif()
if(INTL_FOUND)
	list(APPEND LIBS ${INTL_LIBRARIES})
endif()
if(BELCARD_FOUND)
	list(APPEND LIBS ${BELCARD_LIBRARIES})
endif()
65 66 67
if(ENABLE_TUNNEL)
	add_definitions(-DTUNNEL_ENABLED)
endif()
Ghislain MARY's avatar
Ghislain MARY committed
68

69
set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
70
	address/address-p.h
Ronan's avatar
Ronan committed
71
	address/address.h
72
	address/identity-address.h
73
	c-wrapper/c-wrapper.h
74
	c-wrapper/internal/c-sal.h
Ronan's avatar
Ronan committed
75
	c-wrapper/internal/c-tools.h
76
	call/call-p.h
77
	call/call.h
78 79 80 81
	call/local-conference-call-p.h
	call/local-conference-call.h
	call/remote-conference-call-p.h
	call/remote-conference-call.h
Ronan's avatar
Ronan committed
82 83
	chat/chat-message/chat-message-p.h
	chat/chat-message/chat-message.h
Ghislain MARY's avatar
Ghislain MARY committed
84
	chat/chat-message/imdn-message.h
85
	chat/chat-message/imdn-message-p.h
Ghislain MARY's avatar
Ghislain MARY committed
86
	chat/chat-message/is-composing-message.h
87
	chat/chat-message/notification-message.h
Ghislain MARY's avatar
Ghislain MARY committed
88
	chat/chat-message/notification-message-p.h
89 90
	chat/chat-room/abstract-chat-room-p.h
	chat/chat-room/abstract-chat-room.h
Ronan's avatar
Ronan committed
91 92
	chat/chat-room/basic-chat-room-p.h
	chat/chat-room/basic-chat-room.h
93
	chat/chat-room/basic-to-client-group-chat-room.h
94
	chat/chat-room/chat-room-id.h
95
	chat/chat-room/chat-room-listener.h
Ronan's avatar
Ronan committed
96 97 98 99
	chat/chat-room/chat-room-p.h
	chat/chat-room/chat-room.h
	chat/chat-room/client-group-chat-room-p.h
	chat/chat-room/client-group-chat-room.h
100 101 102
	chat/chat-room/client-group-to-basic-chat-room.h
	chat/chat-room/proxy-chat-room-p.h
	chat/chat-room/proxy-chat-room.h
Ronan's avatar
Ronan committed
103 104
	chat/chat-room/real-time-text-chat-room-p.h
	chat/chat-room/real-time-text-chat-room.h
105 106
	chat/chat-room/server-group-chat-room-p.h
	chat/chat-room/server-group-chat-room.h
Ronan's avatar
Ronan committed
107 108 109 110 111 112 113
	chat/cpim/cpim.h
	chat/cpim/header/cpim-core-headers.h
	chat/cpim/header/cpim-generic-header.h
	chat/cpim/header/cpim-header-p.h
	chat/cpim/header/cpim-header.h
	chat/cpim/message/cpim-message.h
	chat/cpim/parser/cpim-parser.h
114 115
	chat/modifier/chat-message-modifier.h
	chat/modifier/cpim-chat-message-modifier.h
116
	chat/modifier/encryption-chat-message-modifier.h
117
	chat/modifier/file-transfer-chat-message-modifier.h
118
	chat/modifier/multipart-chat-message-modifier.h
119 120
	chat/notification/imdn.h
	chat/notification/is-composing-listener.h
121
	chat/notification/is-composing.h
122
	conference/conference-listener.h
123
	conference/conference-p.h
124
	conference/conference.h
125 126 127 128
	conference/handlers/local-conference-event-handler-p.h
	conference/handlers/local-conference-event-handler.h
	conference/handlers/remote-conference-event-handler-p.h
	conference/handlers/remote-conference-event-handler.h
129
	conference/local-conference-p.h
Ronan's avatar
Ronan committed
130
	conference/local-conference.h
131
	conference/params/call-session-params-p.h
132
	conference/params/call-session-params.h
133
	conference/params/media-session-params-p.h
134
	conference/params/media-session-params.h
135
	conference/participant-device.h
136 137
	conference/participant-imdn-state.h
	conference/participant-imdn-state-p.h
138
	conference/participant-p.h
139
	conference/participant.h
140
	conference/remote-conference-p.h
Ronan's avatar
Ronan committed
141
	conference/remote-conference.h
142
	conference/session/call-session-listener.h
143
	conference/session/call-session-p.h
144
	conference/session/call-session.h
145
	conference/session/media-session.h
146
	conference/session/port-config.h
147
	containers/lru-cache.h
148
	content/content-disposition.h
149
	content/content-manager.h
150
	content/content-p.h
Ronan's avatar
Ronan committed
151 152
	content/content-type.h
	content/content.h
153 154
	content/file-content.h
	content/file-transfer-content.h
155 156 157
	content/header/header.h
	content/header/header-p.h
	content/header/header-param.h
158
	core/core-accessor.h
159
	core/core-listener.h
160
	core/core-p.h
Ronan's avatar
Ronan committed
161
	core/core.h
162 163
	core/paths/paths.h
	core/platform-helpers/platform-helpers.h
Ronan's avatar
Ronan committed
164 165
	db/abstract/abstract-db-p.h
	db/abstract/abstract-db.h
166 167
	db/internal/db-transaction.h
	db/internal/statements.h
168
	db/main-db-chat-message-key.h
169
	db/main-db-event-key.h
170 171
	db/main-db-key-p.h
	db/main-db-key.h
Ronan's avatar
Ronan committed
172
	db/main-db-p.h
173
	db/main-db.h
Ronan's avatar
Ronan committed
174
	db/session/db-session.h
175 176
	dial-plan/dial-plan-p.h
	dial-plan/dial-plan.h
Ronan's avatar
Ronan committed
177
	enums.h
178
	event-log/conference/conference-call-event.h
Ronan's avatar
Ronan committed
179 180 181 182 183 184 185 186
	event-log/conference/conference-event-p.h
	event-log/conference/conference-event.h
	event-log/conference/conference-notified-event-p.h
	event-log/conference/conference-notified-event.h
	event-log/conference/conference-participant-device-event.h
	event-log/conference/conference-participant-event-p.h
	event-log/conference/conference-participant-event.h
	event-log/conference/conference-subject-event.h
Ronan's avatar
Ronan committed
187 188
	event-log/event-log-p.h
	event-log/event-log.h
189
	event-log/events.h
Ghislain MARY's avatar
Ghislain MARY committed
190
	hacks/hacks.h
Ronan's avatar
Ronan committed
191
	logger/logger.h
192 193
	nat/ice-agent.h
	nat/stun-client.h
Ronan's avatar
Ronan committed
194
	object/app-data-container.h
195 196
	object/base-object-p.h
	object/base-object.h
Ghislain MARY's avatar
Ghislain MARY committed
197
	object/clonable-object-p.h
Ronan's avatar
Ronan committed
198
	object/clonable-object.h
199
	object/clonable-shared-pointer.h
200 201
	object/object-head-p.h
	object/object-head.h
202
	object/object-p.h
Ronan's avatar
Ronan committed
203
	object/object.h
204
	object/property-container.h
205
	object/singleton.h
206
	sal/sal.h
Erwan Croze's avatar
Erwan Croze committed
207
	search/magic-search-p.h
208 209
	search/magic-search.h
	search/search-result.h
210
	utils/background-task.h
211
	utils/payload-type-handler.h
212
	variant/variant.h
213
	xml/conference-info.h
Ghislain MARY's avatar
Ghislain MARY committed
214
	xml/imdn.h
215
	xml/is-composing.h
Ghislain MARY's avatar
Ghislain MARY committed
216
	xml/linphone-imdn.h
217
	xml/resource-lists.h
218
	xml/xml.h
219 220 221
)

set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
Ronan's avatar
Ronan committed
222
	address/address.cpp
223
	address/identity-address.cpp
224
	c-wrapper/api/c-address.cpp
225
	c-wrapper/api/c-call-cbs.cpp
226
	c-wrapper/api/c-call-params.cpp
227
	c-wrapper/api/c-call-stats.cpp
Ronan's avatar
Ronan committed
228
	c-wrapper/api/c-call.cpp
229
	c-wrapper/api/c-chat-message-cbs.cpp
Ronan's avatar
Ronan committed
230
	c-wrapper/api/c-chat-message.cpp
231
	c-wrapper/api/c-chat-room-cbs.cpp
Ronan's avatar
Ronan committed
232
	c-wrapper/api/c-chat-room.cpp
233
	c-wrapper/api/c-core.cpp
234
	c-wrapper/api/c-content.cpp
235
	c-wrapper/api/c-dial-plan.cpp
Ronan's avatar
Ronan committed
236
	c-wrapper/api/c-event-log.cpp
Erwan Croze's avatar
Erwan Croze committed
237
	c-wrapper/api/c-magic-search.cpp
238
	c-wrapper/api/c-participant.cpp
239
	c-wrapper/api/c-participant-imdn-state.cpp
Erwan Croze's avatar
Erwan Croze committed
240
	c-wrapper/api/c-search-result.cpp
241
	c-wrapper/internal/c-sal.cpp
242
	c-wrapper/internal/c-tools.cpp
243
	call/call.cpp
244 245
	call/local-conference-call.cpp
	call/remote-conference-call.cpp
Ronan's avatar
Ronan committed
246
	chat/chat-message/chat-message.cpp
Ghislain MARY's avatar
Ghislain MARY committed
247
	chat/chat-message/imdn-message.cpp
Ghislain MARY's avatar
Ghislain MARY committed
248
	chat/chat-message/is-composing-message.cpp
249
	chat/chat-message/notification-message.cpp
250
	chat/chat-room/abstract-chat-room.cpp
Ronan's avatar
Ronan committed
251
	chat/chat-room/basic-chat-room.cpp
252
	chat/chat-room/basic-to-client-group-chat-room.cpp
253
	chat/chat-room/chat-room-id.cpp
Ronan's avatar
Ronan committed
254 255
	chat/chat-room/chat-room.cpp
	chat/chat-room/client-group-chat-room.cpp
256 257
	chat/chat-room/client-group-to-basic-chat-room.cpp
	chat/chat-room/proxy-chat-room.cpp
Ronan's avatar
Ronan committed
258
	chat/chat-room/real-time-text-chat-room.cpp
259
	chat/chat-room/server-group-chat-room-stub.cpp
Ronan's avatar
Ronan committed
260 261 262 263 264
	chat/cpim/header/cpim-core-headers.cpp
	chat/cpim/header/cpim-generic-header.cpp
	chat/cpim/header/cpim-header.cpp
	chat/cpim/message/cpim-message.cpp
	chat/cpim/parser/cpim-parser.cpp
265
	chat/modifier/cpim-chat-message-modifier.cpp
266
	chat/modifier/encryption-chat-message-modifier.cpp
267
	chat/modifier/file-transfer-chat-message-modifier.cpp
268
	chat/modifier/multipart-chat-message-modifier.cpp
269 270
	chat/notification/imdn.cpp
	chat/notification/is-composing.cpp
271
	conference/conference.cpp
272 273
	conference/handlers/local-conference-event-handler.cpp
	conference/handlers/remote-conference-event-handler.cpp
Ronan's avatar
Ronan committed
274
	conference/local-conference.cpp
275 276
	conference/params/call-session-params.cpp
	conference/params/media-session-params.cpp
277
	conference/participant-device.cpp
278
	conference/participant-imdn-state.cpp
279
	conference/participant.cpp
Ronan's avatar
Ronan committed
280
	conference/remote-conference.cpp
281 282
	conference/session/call-session.cpp
	conference/session/media-session.cpp
283
	content/content-disposition.cpp
284
	content/content-manager.cpp
Ronan's avatar
Ronan committed
285 286
	content/content-type.cpp
	content/content.cpp
287 288
	content/file-content.cpp
	content/file-transfer-content.cpp
289 290
	content/header/header.cpp
	content/header/header-param.cpp
291
	core/core-accessor.cpp
292
	core/core-call.cpp
293
	core/core-chat-room.cpp
294
	core/core.cpp
295 296
	core/paths/paths.cpp
	core/platform-helpers/platform-helpers.cpp
Ronan's avatar
Ronan committed
297
	db/abstract/abstract-db.cpp
298
	db/internal/statements.cpp
299
	db/main-db-chat-message-key.cpp
300
	db/main-db-event-key.cpp
301
	db/main-db-key.cpp
302
	db/main-db.cpp
303
	db/session/db-session.cpp
304
	dial-plan/dial-plan.cpp
305
	event-log/conference/conference-call-event.cpp
306
	event-log/conference/conference-chat-message-event.cpp
Ronan's avatar
Ronan committed
307 308 309 310 311
	event-log/conference/conference-event.cpp
	event-log/conference/conference-notified-event.cpp
	event-log/conference/conference-participant-device-event.cpp
	event-log/conference/conference-participant-event.cpp
	event-log/conference/conference-subject-event.cpp
Ronan's avatar
Ronan committed
312
	event-log/event-log.cpp
Ghislain MARY's avatar
Ghislain MARY committed
313
	hacks/hacks.cpp
Ronan's avatar
Ronan committed
314
	logger/logger.cpp
315 316
	nat/ice-agent.cpp
	nat/stun-client.cpp
Ronan's avatar
Ronan committed
317
	object/app-data-container.cpp
318
	object/base-object.cpp
Ghislain MARY's avatar
Ghislain MARY committed
319
	object/clonable-object.cpp
320
	object/object.cpp
321
	object/property-container.cpp
322 323 324 325 326
	sal/call-op.cpp
	sal/event-op.cpp
	sal/message-op.cpp
	sal/op.cpp
	sal/presence-op.cpp
Ronan's avatar
Ronan committed
327
	sal/refer-op.cpp
328 329
	sal/register-op.cpp
	sal/sal.cpp
Erwan Croze's avatar
Erwan Croze committed
330 331
	search/magic-search.cpp
	search/search-result.cpp
332
	utils/background-task.cpp
333
	utils/fs.cpp
334
	utils/general.cpp
335
	utils/payload-type-handler.cpp
336
	utils/utils.cpp
337
	variant/variant.cpp
338
	xml/conference-info.cpp
Ghislain MARY's avatar
Ghislain MARY committed
339
	xml/imdn.cpp
340
	xml/is-composing.cpp
Ghislain MARY's avatar
Ghislain MARY committed
341
	xml/linphone-imdn.cpp
342
	xml/resource-lists.cpp
343
	xml/xml.cpp
344 345
)

346 347
set(LINPHONE_OBJC_SOURCE_FILES)
if (APPLE)
348 349
	list(APPEND LINPHONE_OBJC_SOURCE_FILES core/paths/paths-apple.mm)
	list(APPEND LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES core/paths/paths-apple.h)
350 351
elseif (ANDROID)
	list(APPEND LINPHONE_CXX_OBJECTS_SOURCE_FILES core/paths/paths-android.cpp core/platform-helpers/android-platform-helpers.cpp)
352
	list(APPEND LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES core/paths/paths-android.h)
353
elseif (WIN32)
354 355
	list(APPEND LINPHONE_CXX_OBJECTS_SOURCE_FILES core/paths/paths-windows.cpp)
	list(APPEND LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES core/paths/paths-windows.h)
356
elseif (UNIX)
357 358
	list(APPEND LINPHONE_CXX_OBJECTS_SOURCE_FILES core/paths/paths-linux.cpp)
	list(APPEND LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES core/paths/paths-linux.h)
359
endif ()
360

361 362 363 364 365 366
set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS
	${BELR_INCLUDE_DIRS}
	${LIBXSD_INCLUDE_DIRS}
	${SOCI_INCLUDE_DIRS}
	${SOCI_MYSQL_INCLUDES}
)
367
set(LINPHONE_CXX_OBJECTS_DEFINITIONS "-DLIBLINPHONE_EXPORTS")
368 369
set(LINPHONE_CXX_OBJECTS_INCLUDE_DIRS ${BELR_INCLUDE_DIRS})

370
set(LINPHONE_PRIVATE_HEADER_FILES)
371
foreach (header ${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES})
372
	list(APPEND LINPHONE_PRIVATE_HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${header}")
373
endforeach ()
374 375 376
set(LINPHONE_PRIVATE_HEADER_FILES ${LINPHONE_PRIVATE_HEADER_FILES} PARENT_SCOPE)

bc_apply_compile_flags(LINPHONE_CXX_OBJECTS_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_CXX)
Benjamin REIS's avatar
Benjamin REIS committed
377
bc_apply_compile_flags(LINPHONE_OBJC_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_OBJC)
378

Ghislain MARY's avatar
Ghislain MARY committed
379 380 381

if(ENABLE_STATIC)
	add_library(linphone-static STATIC ${LINPHONE_HEADER_FILES}
382
		${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES} ${LINPHONE_CXX_OBJECTS_SOURCE_FILES} ${LINPHONE_OBJC_SOURCE_FILES}
Ghislain MARY's avatar
Ghislain MARY committed
383
		$<TARGET_OBJECTS:linphone-coreapi-static>
384
	)
Ghislain MARY's avatar
Ghislain MARY committed
385 386 387 388 389 390 391 392 393 394 395 396 397
	set_target_properties(linphone-static PROPERTIES OUTPUT_NAME linphone)
	target_include_directories(linphone-static PUBLIC ${LINPHONE_INCLUDE_DIRS})
	target_link_libraries(linphone-static INTERFACE ${LIBS})
	if(APPLE)
		target_link_libraries(linphone-static INTERFACE "-framework Foundation" "-framework AVFoundation")
	endif()
	install(TARGETS linphone-static EXPORT ${EXPORT_TARGETS_NAME}Targets
		ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
		PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
	)
endif()
if(ENABLE_SHARED)
	add_library(linphone SHARED "../share/cpim_grammar" ${LINPHONE_HEADER_FILES}
398
		${LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES} ${LINPHONE_CXX_OBJECTS_SOURCE_FILES} ${LINPHONE_OBJC_SOURCE_FILES}
Ghislain MARY's avatar
Ghislain MARY committed
399
		$<TARGET_OBJECTS:linphone-coreapi>
400
	)
Ghislain MARY's avatar
Ghislain MARY committed
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473
	if(IOS)
		if(IOS)
			set(MIN_OS ${LINPHONE_IOS_DEPLOYMENT_TARGET})
		else()
			set(MIN_OS ${CMAKE_OSX_DEPLOYMENT_TARGET})
		endif()
		set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build/osx/")
		set_target_properties(linphone PROPERTIES
			FRAMEWORK TRUE
			MACOSX_FRAMEWORK_IDENTIFIER org.linphone.linphone
			MACOSX_FRAMEWORK_INFO_PLIST Info.plist.in
			PUBLIC_HEADER "${LINPHONE_HEADER_FILES}"
			RESOURCE "../share/cpim_grammar"
		)
	endif()
	if(BELCARD_FOUND)
		if(APPLE)
			set_target_properties(linphone PROPERTIES LINK_FLAGS "-stdlib=libc++")
		endif()
	endif()

	set_target_properties(linphone PROPERTIES LINKER_LANGUAGE CXX)
	if(NOT ANDROID)
		# Do not version shared library on Android
		set_target_properties(linphone PROPERTIES SOVERSION ${LINPHONE_SO_VERSION})
	endif()
	target_include_directories(linphone PUBLIC ${LINPHONE_INCLUDE_DIRS})
	target_link_libraries(linphone PRIVATE ${LIBS})
	if(APPLE)
		target_link_libraries(linphone PRIVATE "-framework Foundation" "-framework AVFoundation")
	endif()
	if(WIN32 AND CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone" AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
		set_target_properties(linphone PROPERTIES PREFIX "lib")
	elseif(ANDROID)
		target_link_libraries(linphone PUBLIC "log" ${SUPPORT_LIBRARIES} ${CPUFEATURES_LIBRARIES})
		if(ENABLE_JAVA_WRAPPER)
			add_dependencies(linphone linphonej)
		endif()
	endif()
	if(MSVC)
		if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
			install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/linphone.pdb
				DESTINATION ${CMAKE_INSTALL_BINDIR}
				PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
			)
		endif()
	endif()
	install(TARGETS linphone EXPORT ${EXPORT_TARGETS_NAME}Targets
		RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
		LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
		ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
		FRAMEWORK DESTINATION Frameworks
		PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
	)
endif()
if(ICONV_FOUND)
	if(APPLE)
		# Prevent conflict between the system iconv.h header and the one from macports.
		if(ENABLE_STATIC)
			target_compile_options(linphone-static PRIVATE "-include" "${ICONV_INCLUDE_DIRS}/iconv.h")
		endif()
		if(ENABLE_SHARED)
			target_compile_options(linphone PRIVATE "-include" "${ICONV_INCLUDE_DIRS}/iconv.h")
		endif()
	else()
		if(ENABLE_STATIC)
			target_include_directories(linphone-static PRIVATE ${ICONV_INCLUDE_DIRS})
		endif()
		if(ENABLE_SHARED)
			target_include_directories(linphone PRIVATE ${ICONV_INCLUDE_DIRS})
		endif()
	endif()
endif()