options_mac.cmake 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # This file is part of Desktop App Toolkit,
  2. # a set of libraries for developing nice desktop applications.
  3. #
  4. # For license and copyright information please follow this link:
  5. # https://github.com/desktop-app/legal/blob/master/LEGAL
  6. if (build_macstore)
  7. target_compile_definitions(common_options
  8. INTERFACE
  9. OS_MAC_STORE
  10. MAC_USE_BREAKPAD
  11. )
  12. endif()
  13. if (NOT DESKTOP_APP_USE_PACKAGED)
  14. target_include_directories(common_options SYSTEM
  15. INTERFACE
  16. ${libs_loc}/local/include
  17. )
  18. endif()
  19. target_compile_options(common_options
  20. INTERFACE
  21. -pipe
  22. -Wall
  23. -Wextra
  24. -fPIE
  25. $<$<COMPILE_LANGUAGE:OBJC,OBJCXX>:-fobjc-weak>
  26. -fvisibility-inlines-hidden
  27. -fvisibility=hidden
  28. -Wno-unused-variable
  29. -Wno-unused-parameter
  30. -Wno-unused-function
  31. -Wno-deprecated-this-capture
  32. -Wno-switch
  33. -Wno-comment
  34. -Wno-missing-field-initializers
  35. -Wno-sign-compare
  36. -Wno-unknown-attributes
  37. -Wno-pragma-system-header-outside-header
  38. -Wno-shorten-64-to-32
  39. )
  40. if (DESKTOP_APP_SPECIAL_TARGET)
  41. target_compile_options(common_options
  42. INTERFACE
  43. -g
  44. -Werror
  45. )
  46. endif()
  47. if (CMAKE_BUILD_TYPE STREQUAL "Debug")
  48. target_link_options_if_exists(common_options
  49. INTERFACE
  50. -Wl,-no_warn_duplicate_libraries
  51. )
  52. endif()
  53. target_link_frameworks(common_options
  54. INTERFACE
  55. Cocoa
  56. CoreFoundation
  57. CoreLocation
  58. CoreServices
  59. CoreText
  60. CoreGraphics
  61. CoreMedia
  62. OpenGL
  63. AudioUnit
  64. ApplicationServices
  65. Foundation
  66. AGL
  67. Security
  68. SystemConfiguration
  69. Carbon
  70. AudioToolbox
  71. VideoToolbox
  72. VideoDecodeAcceleration
  73. AVFoundation
  74. CoreAudio
  75. CoreVideo
  76. CoreMediaIO
  77. QuartzCore
  78. AppKit
  79. CoreWLAN
  80. WebKit
  81. IOKit
  82. GSS
  83. MediaPlayer
  84. IOSurface
  85. Metal
  86. LocalAuthentication
  87. )