build_res.pri 973 B

123456789101112131415161718192021222324252627
  1. message(==========BUILDING EXTERNAL RES============)
  2. guiRes.target = BuildResources
  3. exists($$BIN_PATH/res) {
  4. message("Directory $$BIN_PATH/res already exists")
  5. } else {
  6. message("Directory $$BIN_PATH/res DOES NOT exist")
  7. guiRes.commands += $(MKDIR) \"$$BIN_PATH/res\" $$escape_expand(\n\t)
  8. }
  9. EXT_RES = \
  10. "$${PROJECT_ROOT_PATH}/resources/backgrounds.qrc -o $$BIN_PATH/data01.gtr" \
  11. "$${PROJECT_ROOT_PATH}/resources/common.qrc -o $$BIN_PATH/data02.gtr" \
  12. "$${PROJECT_ROOT_PATH}/resources/backgrounds_advanced.qrc -o $$BIN_PATH/data_adv.gtr"
  13. for (RES, EXT_RES) {
  14. win32 {
  15. message(rcc.exe -binary $${RES})
  16. guiRes.commands += rcc.exe -binary $${RES} $$escape_expand(\n\t)
  17. }
  18. unix {
  19. guiRes.commands += rcc -binary $${RES} $$escape_expand(\n\t)
  20. }
  21. }
  22. QMAKE_EXTRA_TARGETS += guiRes
  23. PRE_TARGETDEPS += BuildResources