0030679: Attached model hangs most of OCCT common functionality
[occt.git] / samples / qt / Tutorial / Tutorial.pro
1 TEMPLATE = app
2 CONFIG += debug_and_release qt
3
4 TARGET = Tutorial
5
6 SAMPLESROOT = $$quote($$(CSF_OCCTSamplesPath)/qt)
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 INCLUDEPATH += $$quote($$(CSF_OCCTIncludePath))
29
30 OCCT_DEFINES = $$(CSF_DEFINES)
31
32 DEFINES = $$split(OCCT_DEFINES, ;)
33
34 unix {
35     UNAME = $$system(uname -s)
36     LIBLIST = $$(LD_LIBRARY_PATH)
37     LIBPATHS = $$split(LIBLIST,":")
38     for(lib, LIBPATHS):LIBS += -L$${lib}
39
40     CONFIG(debug, debug|release) {
41         DESTDIR = ./$$UNAME/bind
42         OBJECTS_DIR = ./$$UNAME/objd
43         MOC_DIR = ./$$UNAME/mocd
44     } else {
45         DESTDIR = ./$$UNAME/bin
46         OBJECTS_DIR = ./$$UNAME/obj
47         MOC_DIR = ./$$UNAME/moc
48     }
49
50     MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
51
52     !macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
53     equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX
54     DEFINES += OCC_CONVERT_SIGNALS QT_NO_STL
55     !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
56     LIBS += -lfreeimageplus
57     LIBS += -ltbb -ltbbmalloc
58     QMAKE_CXXFLAGS += -std=gnu++11
59 }
60
61 win32 {
62     CONFIG(debug, debug|release) {
63         DEFINES += _DEBUG
64         DESTDIR = ./win$$(ARCH)/$$(VCVER)/bind
65         OBJECTS_DIR = ./win$$(ARCH)/$$(VCVER)/objd
66         MOC_DIR = ./win$$(ARCH)/$$(VCVER)/mocd
67     } else {
68         DEFINES += NDEBUG
69         DESTDIR = ./win$$(ARCH)/$$(VCVER)/bin
70         OBJECTS_DIR = ./win$$(ARCH)/$$(VCVER)/obj
71         MOC_DIR = ./win$$(ARCH)/$$(VCVER)/moc
72     }
73     LIBS = -L$$(QTDIR)/lib;$$(CSF_OCCTLibPath)
74     DEFINES += NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
75 }
76
77 LIBS += -lTKernel -lTKMath -lTKService -lTKV3d -lTKOpenGl \
78         -lTKBRep -lTKIGES -lTKSTL -lTKVRML -lTKSTEP -lTKSTEPAttr -lTKSTEP209 \
79         -lTKSTEPBase -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
80         -lTKXSBase -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim \
81         -lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset -lTKLCAF \
82
83 !exists($${RES_DIR}) {
84     win32 {
85         system(mkdir $${RES_DIR})
86     } else {
87         system(mkdir -p $${RES_DIR})
88     }
89 }
90
91 lrelease.name = LRELEASE ${QMAKE_FILE_IN}
92 lrelease.commands = lrelease ${QMAKE_FILE_IN} -qm $${RES_DIR}/${QMAKE_FILE_BASE}.qm
93 lrelease.output = ${QMAKE_FILE_BASE}.qm
94 lrelease.input = TS_FILES
95 lrelease.clean = $${RES_DIR}/${QMAKE_FILE_BASE}.qm
96 lrelease.CONFIG += no_link target_predeps
97 QMAKE_EXTRA_COMPILERS += lrelease
98
99 copy_res.name = Copy resource ${QMAKE_FILE_IN}
100 copy_res.output = ${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
101 copy_res.clean = $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
102 copy_res.input = RES_FILES
103 copy_res.CONFIG += no_link target_predeps
104 win32: copy_res.commands = type ${QMAKE_FILE_IN} > $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
105 unix:  copy_res.commands = cp -f ${QMAKE_FILE_IN} $${RES_DIR}
106 QMAKE_EXTRA_COMPILERS += copy_res
107 #QMAKE_CXXFLAGS += /wd4996
108
109 greaterThan(QT_MAJOR_VERSION, 4) {
110     QT += widgets
111