options.cmake 887 B

123456789101112131415161718192021222324252627282930313233
  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. add_library(common_options INTERFACE)
  7. add_library(desktop-app::common_options ALIAS common_options)
  8. target_compile_definitions(common_options
  9. INTERFACE
  10. $<$<CONFIG:Debug>:_DEBUG>
  11. QT_NO_KEYWORDS
  12. QT_NO_CAST_FROM_BYTEARRAY
  13. QT_DEPRECATED_WARNINGS_SINCE=0x051500
  14. )
  15. if (DESKTOP_APP_DISABLE_X11_INTEGRATION)
  16. target_compile_definitions(common_options
  17. INTERFACE
  18. DESKTOP_APP_DISABLE_X11_INTEGRATION
  19. )
  20. endif()
  21. if (WIN32)
  22. include(cmake/options_win.cmake)
  23. elseif (APPLE)
  24. include(cmake/options_mac.cmake)
  25. elseif (LINUX)
  26. include(cmake/options_linux.cmake)
  27. else()
  28. message(FATAL_ERROR "Unknown platform type")
  29. endif()