fresh-bundle.pri 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. win32_crossbuild {
  2. exists( "$(QT_WIN32_PATH)/lib/*fresh*" ):CONFIG *= fresh
  3. } else {
  4. exists( "$$[QT_INSTALL_LIBS]/*fresh*" ):CONFIG *= fresh
  5. }
  6. fresh {
  7. !build_pass:message( "Using system fresh library." )
  8. } else {
  9. isEmpty( FRESH_BUNDLE_PATH ) {
  10. !build_pass:error( "FRESH_BUNDLE_PATH is empty. Please declare this variable before include this file" )
  11. }
  12. isEmpty( FRESH_BUNDLE_LIB_PATH ) {
  13. !build_pass:error( "FRESH_BUNDLE_LIB_PATH is empty. Please declare this variable before include this file" )
  14. }
  15. exists( $${FRESH_BUNDLE_PATH}/fresh.pro ) {
  16. !build_pass:message( "Using bundled fresh library (1)." )
  17. include( $${FRESH_BUNDLE_PATH}/qmake-extensions.git/qmake-extensions.pri )
  18. FRESH_SOURCES_PATHS = $$getFolders( $${FRESH_BUNDLE_PATH}/src )
  19. } else:exists( $${_PRO_FILE_PWD_}/$${FRESH_BUNDLE_PATH}/fresh.pro ) {
  20. !build_pass:message( "Using bundled fresh library (2)." )
  21. include( $${_PRO_FILE_PWD_}/$${FRESH_BUNDLE_PATH}/qmake-extensions.git/qmake-extensions.pri )
  22. isShadowBuild() {
  23. FRESH_SOURCES_PATHS = $$getFolders( $${_PRO_FILE_PWD_}/$${FRESH_BUNDLE_PATH}/src )
  24. } else {
  25. FRESH_SOURCES_PATHS = $$getRelativeFolders( $${_PRO_FILE_PWD_}/$${FRESH_BUNDLE_PATH}/src, $${_PRO_FILE_PWD_}/ )
  26. }
  27. } else {
  28. !build_pass:error( "Fresh library not found - Execute: git submodule init && git submodule update." )
  29. }
  30. DEFINES *= FRESH_CORE_BUILD
  31. DEPENDPATH *= $${FRESH_SOURCES_PATHS}
  32. DEPENDPATH *= $${FRESH_BUNDLE_PATH}/include/FreshCore \
  33. $${FRESH_BUNDLE_PATH}/include/FreshGui
  34. INCLUDEPATH *= $${FRESH_BUNDLE_PATH}/include
  35. INCLUDEPATH *= $${FRESH_SOURCES_PATHS}
  36. QMAKE_RPATHDIR *= $${FRESH_BUNDLE_LIB_PATH}/build
  37. macx:LIBS *= -F$${FRESH_BUNDLE_LIB_PATH}/build
  38. LIBS *= -L$${FRESH_BUNDLE_LIB_PATH}/build
  39. QT *= xml network
  40. exists( $${FRESH_BUNDLE_LIB_PATH}/build/lib$$targetForMode( fresh ).a ) {
  41. PRE_TARGETDEPS *= $${FRESH_BUNDLE_LIB_PATH}/build/lib$$targetForMode( fresh ).a
  42. }
  43. LIBS *= -l$$targetForMode( fresh )
  44. #!macx:qtAddLibrary( fresh )
  45. #macx:LIBS *= -lfresh
  46. }