e133f70e4717189341f57100142e5af4f6d1b0a1
[occt.git] / samples / qt / Tutorial / Tutorial.pro
1 TEMPLATE = app
2 CONFIG += debug_and_release qt
3
4 TARGET = Tutorial
5
6 SAMPLESROOT = $$(SAMPLESROOT)
7
8 HEADERS   = src/*.h \
9             $${SAMPLESROOT}/Common/src/*.h \
10             $${SAMPLESROOT}/Interface/src/*.h
11
12 SOURCES   = src/*.cxx \
13             $${SAMPLESROOT}/Common/src/*.cxx \
14             $${SAMPLESROOT}/Interface/src/*.cxx
15
16 TS_FILES  = $${SAMPLESROOT}/Common/src/Common-icon.ts \
17             $${SAMPLESROOT}/Common/src/Common-string.ts \
18             ./src/Tutorial-icon.ts \
19             ./src/Tutorial-string.ts
20
21 RES_FILES = $${SAMPLESROOT}/Common/res/* \
22             ./res/*
23
24 RES_DIR   = $$quote($$(RES_DIR))
25
26 INCLUDEPATH += $$quote($${SAMPLESROOT}/Common/src)
27 INCLUDEPATH += $$quote($${SAMPLESROOT}/Interface/src)
28
29 OCCT_DEFINES = $$(CSF_DEFINES)
30
31 DEFINES = CSFDB $$split(OCCT_DEFINES, ;)
32
33 unix {
34     UNAME = $$system(uname -s)
35     INCLUDES = $$(CSF_OPT_INC)
36     PATHS = $$split(INCLUDES,":")
37     for(path, PATHS):INCLUDEPATH += $${path}
38     LIBLIST = $$(LD_LIBRARY_PATH)
39     LIBPATHS = $$split(LIBLIST,":")
40     for(lib, LIBPATHS):LIBS += -L$${lib}
41
42     CONFIG(debug, debug|release) {
43         DESTDIR = ./$$UNAME/bind
44         OBJECTS_DIR = ./$$UNAME/objd
45         MOC_DIR = ./$$UNAME/mocd
46     } else {
47         DESTDIR = ./$$UNAME/bin
48         OBJECTS_DIR = ./$$UNAME/obj
49         MOC_DIR = ./$$UNAME/moc
50     }
51
52     MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
53
54     !macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
55     !macx | equals(MACOSX_USE_GLX, true): DEFINES += LIN LININTEL
56     equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX
57     DEFINES += OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL
58     !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
59     LIBS += -lfreeimageplus
60     LIBS += -ltbb -ltbbmalloc
61 }
62
63 win32 {
64     INCLUDES = $$(CSF_OPT_INC)
65     PATHS = $$split(INCLUDES,";")
66     for(path, PATHS):INCLUDEPATH += $${path}
67
68     CONFIG(debug, debug|release) {
69         DEFINES += _DEBUG
70         DESTDIR = ./win$(ARCH)/$(VCVER)/bind
71         OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd
72         MOC_DIR = ./win$(ARCH)/$(VCVER)/mocd
73         !contains(QMAKE_HOST.arch, x86_64) {
74             LIBS = -L$(CSF_OPT_LIB32D)
75         } else {
76             LIBS = -L$(CSF_OPT_LIB64D)
77         }
78     } else {
79         DEFINES += NDEBUG
80         DESTDIR = ./win$(ARCH)/$(VCVER)/bin
81         OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
82         MOC_DIR = ./win$(ARCH)/$(VCVER)/moc
83         !contains(QMAKE_HOST.arch, x86_64) {
84             LIBS = -L$(CSF_OPT_LIB32)
85         } else {
86             LIBS = -L$(CSF_OPT_LIB64)
87         }
88     }
89     DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
90 }
91
92 LIBS += -lTKernel -lPTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \
93         -lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
94         -lTKSTEPBase -lTKShapeSchema -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
95         -lTKXSBase -lTKPShape -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
96         -lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset \
97
98 !exists($${RES_DIR}) {
99     win32 {
100         system(mkdir $${RES_DIR})
101     } else {
102         system(mkdir -p $${RES_DIR})
103     }
104 }
105
106 lrelease.name = LRELEASE ${QMAKE_FILE_IN}
107 lrelease.commands = lrelease ${QMAKE_FILE_IN} -qm $${RES_DIR}/${QMAKE_FILE_BASE}.qm
108 lrelease.output = ${QMAKE_FILE_BASE}.qm
109 lrelease.input = TS_FILES
110 lrelease.clean = $${RES_DIR}/${QMAKE_FILE_BASE}.qm
111 lrelease.CONFIG += no_link target_predeps
112 QMAKE_EXTRA_COMPILERS += lrelease
113
114 copy_res.name = Copy resource ${QMAKE_FILE_IN}
115 copy_res.output = ${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
116 copy_res.clean = $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
117 copy_res.input = RES_FILES
118 copy_res.CONFIG += no_link target_predeps
119 win32: copy_res.commands = type ${QMAKE_FILE_IN} > $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
120 unix:  copy_res.commands = cp -f ${QMAKE_FILE_IN} $${RES_DIR}
121 QMAKE_EXTRA_COMPILERS += copy_res
122 #QMAKE_CXXFLAGS += /wd4996
123
124 greaterThan(QT_MAJOR_VERSION, 4) {
125     QT += widgets
126