CMakeLists.txt 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. if(QT_VERSION_MAJOR EQUAL 6)
  2. qt6_add_executable(map_editor
  3. main.cpp
  4. editor_window.cpp
  5. map_data.cpp
  6. map_canvas.cpp
  7. tool_panel.cpp
  8. json_edit_dialog.cpp
  9. resize_dialog.cpp
  10. )
  11. else()
  12. add_executable(map_editor
  13. main.cpp
  14. editor_window.cpp
  15. map_data.cpp
  16. map_canvas.cpp
  17. tool_panel.cpp
  18. json_edit_dialog.cpp
  19. resize_dialog.cpp
  20. )
  21. endif()
  22. target_link_libraries(map_editor
  23. PRIVATE
  24. Qt${QT_VERSION_MAJOR}::Core
  25. Qt${QT_VERSION_MAJOR}::Widgets
  26. )
  27. # Keep tool binaries alongside the main game binary for consistent dev runs
  28. # (Makefile expects executables under build/bin)
  29. set_target_properties(map_editor PROPERTIES
  30. RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
  31. RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/bin"
  32. RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/bin"
  33. RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/bin"
  34. RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_BINARY_DIR}/bin"
  35. )