installs.pri 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # Fresh Install Project File
  2. !build_pass:!no_fresh_install {
  3. mac:universal {
  4. UNIVERSAL_TEXT = "(universal)"
  5. }
  6. FRESH_INSTALL_HEADERS = $$[QT_INSTALL_HEADERS]
  7. FRESH_INSTALL_LIBS = $$[QT_INSTALL_LIBS]
  8. FRESH_INSTALL_TRANSLATIONS = $$[QT_INSTALL_TRANSLATIONS]
  9. FRESH_INSTALL_FEATURES = $$[QMAKE_MKSPECS]/features
  10. win32_crossbuild {
  11. FRESH_INSTALL_HEADERS = $(QT_WIN32_PATH)/include
  12. FRESH_INSTALL_LIBS = $(QT_WIN32_PATH)/lib
  13. FRESH_INSTALL_TRANSLATIONS = $(QT_WIN32_PATH)/translations
  14. FRESH_INSTALL_FEATURES = $(QT_WIN32_PATH)/mkspecs/features
  15. }
  16. message( "Configuring Fresh..." )
  17. message( "Build mode: $$FRESH_BUILD_MODE" )
  18. message( "Build type: $$FRESH_BUILD_TYPE $$UNIVERSAL_TEXT" )
  19. message( "Install headers: $$FRESH_INSTALL_HEADERS" )
  20. message( "Install libs: $$FRESH_INSTALL_LIBS" )
  21. message( "Install translations: $$FRESH_INSTALL_TRANSLATIONS" )
  22. message( "You can change the build mode:" )
  23. message( " qmake \"build_mode = release\"" )
  24. message( " qmake \"build_mode = debug\"" )
  25. message( "You can change the build type:" )
  26. message( " qmake \"build_type = static\"" )
  27. message( " qmake \"build_type = shared\"" )
  28. mac:!universal {
  29. message( "You can create a universal build:" )
  30. message( " qmake \"CONFIG *= universal\"" )
  31. }
  32. message( "Multiple options can be use at same time" )
  33. message( "Configuration complete" )
  34. # core headers
  35. fresh_core_headers.path = $$FRESH_INSTALL_HEADERS/FreshCore
  36. fresh_core_headers.files = include/FreshCore/*
  37. win32:!win32_crossbuild:fresh_core_headers.files *= $$system( for /R src/core %i in (*.h) do @echo %i )
  38. else:fresh_core_headers.files *= $$system( find src/core -name '*.h' )
  39. fresh_core_headers.files = $$replace( fresh_core_headers.files, $$BACKSLASH, $$SLASH )
  40. # gui headers
  41. fresh_gui_headers.path = $$FRESH_INSTALL_HEADERS/FreshGui
  42. fresh_gui_headers.files = include/FreshGui/*
  43. win32:!win32_crossbuild:fresh_gui_headers.files *= $$system( for /R src/gui %i in (*.h) do @echo %i )
  44. else:fresh_gui_headers.files *= $$system( find src/gui -name '*.h' )
  45. fresh_gui_headers.files = $$replace( fresh_gui_headers.files, $$BACKSLASH, $$SLASH )
  46. # generate fresh.prf
  47. # remove old one if needed
  48. exists( "fresh.prf" ) {
  49. win32:!win32_crossbuild:system( "del fresh.prf" )
  50. else:system( "rm fresh.prf" )
  51. }
  52. # create new one based on build type
  53. isEqual( FRESH_BUILD_TYPE, static ) {
  54. win32:!win32_crossbuild:system( "copy fresh_static.prf fresh.prf" )
  55. else:system( "cp fresh_static.prf fresh.prf" )
  56. } else {
  57. win32:!win32_crossbuild:system( "copy fresh_shared.prf fresh.prf" )
  58. else:system( "cp fresh_shared.prf fresh.prf" )
  59. }
  60. # features
  61. features.path = $$FRESH_INSTALL_FEATURES
  62. features.files = fresh.prf
  63. # translations
  64. translations.path = $$FRESH_INSTALL_TRANSLATIONS
  65. translations.files = translations/*.ts
  66. translations.files *= translations/*.qm
  67. # library
  68. target.path = $$FRESH_INSTALL_LIBS
  69. INSTALLS = fresh_core_headers fresh_gui_headers features translations target
  70. # cmake
  71. !win32:CMAKE_ROOT = $$system( "cmake --system-information 2> /dev/null | grep CMAKE_ROOT | cut -d ' ' -f 2 | sed s/'\"'/''/g" )
  72. !isEmpty( CMAKE_ROOT ) {
  73. CMAKE_PATH = $$CMAKE_ROOT/Modules/
  74. exists( $$CMAKE_PATH ) {
  75. cmake.path = $$CMAKE_PATH
  76. cmake.files = FindFresh.cmake
  77. INSTALLS *= cmake
  78. }
  79. }
  80. }