-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFluBS.pro
152 lines (109 loc) · 4.63 KB
/
FluBS.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
QT += core gui opengl
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = FluBS
DESTDIR = ./bin
TEMPLATE = app
CONFIG += console c++11
QMAKE_CXXFLAGS += -std=c++11 -g
SOURCES += $$PWD/src/*.cpp \
$$PWD/src/MeshSampler/*.cpp \
$$PWD/src/Mesh/*.cpp \
$$PWD/src/FluidSystem/*.cpp \
$$PWD/src/SPH/*.cpp \
$$PWD/src/Render/*.cpp \
$$PWD/src/Widget/*.cpp \
$$PWD/src/Cache/*.cpp
HEADERS += $$PWD/include/*.h \
$$PWD/include/MeshSampler/*.h \
$$PWD/include/Mesh/*.h \
$$PWD/include/FluidSystem/*.h \
$$PWD/include/SPH/*.h \
$$PWD/include/Render/*.h \
$$PWD/include/Widget/*.h \
$$PWD/include/Cache/*.h \
$$PWD/json/src/json.hpp
OTHER_FILES += shader/* \
shader/Fluid/* \
shader/Skybox/* \
shader/Fluid/Bioluminescent/*
INCLUDEPATH += $$PWD/include \
/usr/local/include \
/usr/include \
/home/idris/dev/include
LIBS += -L/usr/local/lib -L/usr/lib -lGL -lGLU -lGLEW \
-L/home/idris/dev/lib -L/usr/local/lib -lassimp
OBJECTS_DIR = ./obj
MOC_DIR = ./moc
FORMS += ./form/*.ui
UI_DIR += ./ui
#--------------------------------------------------------------------------
# CUDA stuff
#--------------------------------------------------------------------------
HEADERS += $$PWD/cuda_inc/*.cuh \
$$PWD/cuda_inc/*.h
INCLUDEPATH += ./cuda_inc \
./include
CUDA_SOURCES += ./cuda_src/*.cu
CUDA_PATH = /usr
NVCC = $$CUDA_PATH/bin/nvcc
SYSTEM_NAME = unix
SYSTEM_TYPE = 64
GENCODE_FLAGS += -arch=sm_50
NVCC_OPTIONS = -ccbin g++ --compiler-options -fno-strict-aliasing --ptxas-options=-v #-rdc=true --use_fast_math
# include paths
INCLUDEPATH += $(CUDA_PATH)/include $(CUDA_PATH)/include/cuda
# library directories
QMAKE_LIBDIR += $$CUDA_PATH/lib/x86_64-linux-gnu $(CUDA_PATH)/include/cuda
CUDA_OBJECTS_DIR = $$PWD/cuda_obj
# The following makes sure all path names (which often include spaces) are put between quotation marks
CUDA_INC = $$join(INCLUDEPATH,' -I','-I','')
LIBS += -lcudart -lcurand #-lcudadevrt
cuda.input = CUDA_SOURCES
cuda.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
cuda.commands = $$NVCC -m$$SYSTEM_TYPE $$GENCODE_FLAGS -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME} $$NVCC_OPTIONS $$CUDA_INC
cuda.dependency_type = TYPE_C
QMAKE_EXTRA_COMPILERS += cuda
#--------------------------------------------------------------------------
# CUDA dynamic stuff?
#--------------------------------------------------------------------------
##set out cuda sources
#CUDA_SOURCES += ./cuda_src/*.cu
#HEADERS += $$PWD/cuda_inc/*.cuh
## Path to cuda SDK install
#linux:CUDA_DIR = /usr
##Cuda include paths
#INCLUDEPATH += $$CUDA_DIR/include
#INCLUDEPATH += $$CUDA_DIR/common/inc/
#INCLUDEPATH += $$CUDA_DIR/../shared/inc/
#INCLUDEPATH += $$PWD/cuda_inc
##cuda libs
#macx:QMAKE_LIBDIR += $$CUDA_DIR/lib
#linux:QMAKE_LIBDIR += $$CUDA_DIR/lib
#QMAKE_LIBDIR += $$CUDA_DIR/lib
#QMAKE_LIBDIR += $$CUDA_DIR/lib/x86_64-linux-gnu
#QMAKE_LIBDIR += $(CUDA_PATH)/include/cuda
#LIBS += -L$$CUDA_DIR/lib -L$$CUDA_DIR/lib/x86_64-linux-gnu -lcudart -lcudadevrt
## join the includes in a line
#CUDA_INC = $$join(INCLUDEPATH,' -I','-I',' ')
## nvcc flags (ptxas option verbose is always useful)
#NVCCFLAGS = -dc --compiler-options -fno-strict-aliasing --ptxas-options=-v -maxrregcount 20
##prepare intermediat cuda compiler
#cudaIntr.input = CUDA_SOURCES
#cudaIntr.output = ${OBJECTS_DIR}${QMAKE_FILE_BASE}.o
### Tweak arch according to your hw's compute capability
#cudaIntr.commands = $$CUDA_DIR/bin/nvcc -m64 -g -gencode arch=compute_50,code=sm_50 $$NVCCFLAGS $$CUDA_INC $$LIBS ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
##Set our variable out. These obj files need to be used to create the link obj file
##and used in our final gcc compilation
#cudaIntr.variable_out = CUDA_OBJ
#cudaIntr.variable_out += OBJECTS
#cudaIntr.clean = cudaIntrObj/*.o
#QMAKE_EXTRA_UNIX_COMPILERS += cudaIntr
## Prepare the linking compiler step
#cuda.input = CUDA_OBJ
#cuda.output = ${QMAKE_FILE_BASE}_link.o
## Tweak arch according to your hw's compute capability
#cuda.commands = $$CUDA_DIR/bin/nvcc -m64 -g -gencode arch=compute_50,code=sm_50 $$LIBS -dlink ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
#cuda.dependency_type = TYPE_C
#cuda.depend_command = $$CUDA_DIR/bin/nvcc -g -M $$CUDA_INC $$NVCCFLAGS ${QMAKE_FILE_NAME}
## Tell Qt that we want add more stuff to the Makefile
#QMAKE_EXTRA_UNIX_COMPILERS += cuda