-
Notifications
You must be signed in to change notification settings - Fork 72
/
options_mac.cmake
91 lines (86 loc) · 1.77 KB
/
options_mac.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# This file is part of Desktop App Toolkit,
# a set of libraries for developing nice desktop applications.
#
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL
if (build_macstore)
target_compile_definitions(common_options
INTERFACE
OS_MAC_STORE
MAC_USE_BREAKPAD
)
endif()
if (NOT DESKTOP_APP_USE_PACKAGED)
target_include_directories(common_options SYSTEM
INTERFACE
${libs_loc}/local/include
)
endif()
target_compile_options(common_options
INTERFACE
-pipe
-Wall
-Wextra
-fPIE
$<$<COMPILE_LANGUAGE:OBJC,OBJCXX>:-fobjc-weak>
-fvisibility-inlines-hidden
-fvisibility=hidden
-Wno-unused-variable
-Wno-unused-parameter
-Wno-unused-function
-Wno-switch
-Wno-comment
-Wno-missing-field-initializers
-Wno-sign-compare
-Wno-unknown-attributes
-Wno-pragma-system-header-outside-header
-Wno-shorten-64-to-32
)
if (DESKTOP_APP_SPECIAL_TARGET)
target_compile_options(common_options
INTERFACE
-g
-Werror
)
endif()
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_options_if_exists(common_options
INTERFACE
-Wl,-no_warn_duplicate_libraries
)
endif()
target_link_frameworks(common_options
INTERFACE
Cocoa
CoreFoundation
CoreLocation
CoreServices
CoreText
CoreGraphics
CoreMedia
OpenGL
AudioUnit
ApplicationServices
Foundation
AGL
Security
SystemConfiguration
Carbon
AudioToolbox
VideoToolbox
VideoDecodeAcceleration
AVFoundation
CoreAudio
CoreVideo
CoreMediaIO
QuartzCore
AppKit
CoreWLAN
WebKit
IOKit
GSS
MediaPlayer
IOSurface
Metal
LocalAuthentication
)