GTA-VI.pro 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. ######################################################################
  2. ## Select to compilte for debug or release
  3. CONFIG += debug
  4. #CONFIG += release
  5. ## Uncomment line below to use CUDA
  6. #CONFIG += USE_CUDA
  7. ## If you use CUDA you should find the compute capability of your GPU from the
  8. ## following list:
  9. ## https://developer.nvidia.com/cuda-gpus
  10. ## The compute architecture is the same as the compute capability without the dot
  11. CUDA_COMPUTE_ARCH = 52
  12. ## Path to cuda toolkit install
  13. CUDA_DIR = /usr/local/cuda-8.0
  14. QT+=widgets
  15. TEMPLATE = app
  16. TARGET = GTA-VI
  17. INCLUDEPATH += .
  18. QMAKE_CXXFLAGS += -std=c++11
  19. QMAKE_LIBS += -lavutil -lavformat -lavcodec -lswscale
  20. ## Enable profiling with gprof
  21. #QMAKE_CXXFLAGS_DEBUG *= -pg
  22. #QMAKE_LFLAGS_DEBUG *= -pg
  23. ## Setup NVCC for compilation
  24. CONFIG (USE_CUDA) {
  25. ## add macro for conditional compilation in code
  26. DEFINES += USE_CUDA
  27. CUDA_DEFINES += USE_CUDA
  28. ## cuda source
  29. CUDA_SOURCES += EquirectangularToFovVideo.cu
  30. ## Path to cuda toolkit install
  31. INCLUDEPATH += $$CUDA_DIR/include
  32. ## 3rd party headers
  33. SYSTEMINCLUDEPATH = /usr/include/x86_64-linux-gnu/qt5/QtGui
  34. SYSTEMINCLUDEPATH += /usr/include/x86_64-linux-gnu/qt5/QtCore/
  35. SYSTEMINCLUDEPATH += /usr/include/x86_64-linux-gnu/qt5
  36. QMAKE_LIBDIR += $$CUDA_DIR/lib64
  37. ## SYSTEM_TYPE - compiling for 32 or 64 bit architecture
  38. SYSTEM_TYPE = 64
  39. ## correctly formats CUDA_COMPUTE_ARCH to CUDA_ARCH with code gen flags
  40. ## resulting format example: -gencode arch=compute_20,code=sm_20
  41. for(_a, CUDA_COMPUTE_ARCH):{
  42. formatted_arch =$$join(_a,'','-gencode arch=compute_',',code=sm_$$_a')
  43. CUDA_ARCH += $$formatted_arch
  44. }
  45. ## correctly formats CUDA_DEFINES for nvcc
  46. for(_defines, CUDA_DEFINES):{
  47. formatted_defines += -D$$_defines
  48. }
  49. CUDA_DEFINES = $$formatted_defines
  50. ## NVCC flags
  51. NVCCFLAGS += --compiler-options -fno-strict-aliasing -use_fast_math --ptxas-options=-v
  52. ## Path to libraries
  53. LIBS += -lcudart -lcuda
  54. ## join the includes in a line
  55. CUDA_INC = $$join(INCLUDEPATH,' -I','-I',' ')
  56. ## -isystem does not give warnings for vendor supplied headers
  57. CUDA_INC += $$join(SYSTEMINCLUDEPATH,' -isystem ','-isystem ',' ')
  58. ## NVCC_OPTIONS - any further options for the compiler
  59. NVCC_OPTIONS += -Xcompiler -fPIC -std=c++11
  60. CONFIG(debug, debug|release) {
  61. ## Debug settings
  62. cuda_d.input = CUDA_SOURCES
  63. cuda_d.output = ${OBJECTS_DIR}${QMAKE_FILE_BASE}_cuda.o
  64. cuda_d.commands = $$CUDA_DIR/bin/nvcc -D_DEBUG $$CUDA_DEFINES $$NVCC_OPTIONS $$CUDA_INC $$CUDA_LIBS --machine $$SYSTEM_TYPE $$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
  65. cuda_d.dependency_type = TYPE_C
  66. QMAKE_EXTRA_COMPILERS += cuda_d
  67. }
  68. else {
  69. ## Release settings
  70. cuda.input = CUDA_SOURCES
  71. cuda.output = ${OBJECTS_DIR}${QMAKE_FILE_BASE}_cuda.o
  72. cuda.commands = $$CUDA_DIR/bin/nvcc $$CUDA_DEFINES $$NVCC_OPTIONS $$CUDA_INC $$CUDA_LIBS --machine $$SYSTEM_TYPE $$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
  73. cuda.dependency_type = TYPE_C
  74. QMAKE_EXTRA_COMPILERS += cuda
  75. }
  76. }
  77. else {
  78. SOURCES += EquirectangularToFovVideo.cpp
  79. }
  80. ## Input
  81. HEADERS += FlowWidget.h \
  82. MainWindow.h \
  83. PaintGaze.h \
  84. ArffWidgetBase.h \
  85. ArffWidgetCoord.h \
  86. ArffWidgetSpeed.h \
  87. VideoWidget.h \
  88. MediaPlayer.h \
  89. VideoExtractor.h \
  90. EquirectangularToFovBase.h \
  91. EquirectangularToFovVideo.h \
  92. EquirectangularToFovGaze.h \
  93. EquirectangularToFovSpeed.h \
  94. EquirectangularToHead.h \
  95. GazeSpeed.h \
  96. Types.h \
  97. Util.h \
  98. Unused.h \
  99. ../arffHelper/Arff.h \
  100. ../arffHelper/ArffBase.h \
  101. ../arffHelper/AttributeTypes.h \
  102. ../arffHelper/ArffUtil.h \
  103. ../arffHelper/ArffOps.h
  104. SOURCES += FlowWidget.cpp \
  105. GTA-VI.cpp \
  106. MainWindow.cpp \
  107. PaintGaze.cpp \
  108. ArffWidgetBase.cpp \
  109. ArffWidgetCoord.cpp \
  110. ArffWidgetSpeed.cpp \
  111. VideoWidget.cpp \
  112. MediaPlayer.cpp \
  113. VideoExtractor.cpp \
  114. EquirectangularToFovBase.cpp \
  115. EquirectangularToFovGaze.cpp \
  116. EquirectangularToFovSpeed.cpp \
  117. EquirectangularToHead.cpp \
  118. GazeSpeed.cpp \
  119. Util.cpp \
  120. ../arffHelper/Arff.cpp \
  121. ../arffHelper/ArffBase.cpp \
  122. ../arffHelper/AttributeTypes.cpp \
  123. ../arffHelper/ArffUtil.cpp \
  124. ../arffHelper/ArffOps.cpp