You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.4KB

  1. cmake_minimum_required(VERSION 3.14)
  2. cmake_policy(SET CMP0046 NEW)
  3. cmake_policy(SET CMP0063 NEW)
  4. cmake_policy(SET CMP0071 NEW)
  5. project(agw-quake-tools CXX)
  6. if(NOT MSVC)
  7. set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Werror")
  8. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
  9. endif()
  10. macro(make_qt_project TARGET_NAME)
  11. target_include_directories(${TARGET_NAME} PUBLIC source)
  12. set_target_properties(
  13. ${TARGET_NAME}
  14. PROPERTIES
  15. CXX_STANDARD 17
  16. CXX_STANDARD_REQUIRED ON
  17. AUTOMOC ON
  18. AUTOUIC ON
  19. AUTORCC ON)
  20. target_link_libraries(${TARGET_NAME} Qt5::Core Qt5::Gui Qt5::Widgets)
  21. target_compile_definitions(
  22. ${TARGET_NAME}
  23. PUBLIC
  24. -DQT_DISABLE_DEPRECATED_BEFORE=0x051300
  25. -DQT_NO_CAST_FROM_ASCII
  26. -DQT_NO_CAST_TO_ASCII
  27. -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
  28. -DQT_NO_URL_CAST_FROM_STRING
  29. -DQT_STRICT_ITERATORS)
  30. endmacro()
  31. find_package(
  32. Qt5 5.13.0
  33. CONFIG
  34. REQUIRED
  35. COMPONENTS Core Widgets Gui)
  36. add_executable(
  37. quam WIN32
  38. source/common.h
  39. source/quam/archive.cc
  40. source/quam/archive.h
  41. source/quam/main.cc
  42. source/quam/main_window.cc
  43. source/quam/main_window.h
  44. source/quam/main_window.ui
  45. source/quam/pack.cc
  46. source/quam/pack.h
  47. source/quam/project.cc
  48. source/quam/project.h
  49. source/quam/project.ui
  50. source/quam/wad2.cc
  51. source/quam/wad2.h)
  52. make_qt_project(quam)
  53. install(TARGETS quam)
  54. ## EOF