0024665: A sample for advanced function mechanism
[occt.git] / samples / qt / FuncDemo / FuncDemo.pro
1 TEMPLATE = app
2 CONFIG += debug_and_release qt
3
4 TARGET = FuncDemo
5
6 SAMPLESROOT = $$quote($$(CASROOT)/samples/qt)
7
8 HEADERS = src/*.h
9 SOURCES = src/*.cpp
10
11 INCLUDEPATH += $$quote($$(CASROOT)/inc)
12
13 OCCT_DEFINES = $$(CSF_DEFINES)
14
15 DEFINES = $$split(OCCT_DEFINES, ;)
16
17 unix {
18     UNAME = $$system(uname -s)
19     LIBLIST = $$(LD_LIBRARY_PATH)
20     LIBPATHS = $$split(LIBLIST,":")
21     for(lib, LIBPATHS):LIBS += -L$${lib}
22
23     CONFIG(debug, debug|release) {
24         DESTDIR = ./$$UNAME/bind
25         OBJECTS_DIR = ./$$UNAME/objd
26         MOC_DIR = ./src
27     } else {
28         DESTDIR = ./$$UNAME/bin
29         OBJECTS_DIR = ./$$UNAME/obj
30         MOC_DIR = ./src
31     }
32
33     MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
34
35     !macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
36     equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX
37     DEFINES += OCC_CONVERT_SIGNALS QT_NO_STL
38     !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
39     QMAKE_CXXFLAGS += -std=gnu++11
40 }
41
42 win32 {
43     CONFIG(debug, debug|release) {
44         DEFINES += _DEBUG
45         DESTDIR = ./win$(ARCH)/$(VCVER)/bind
46         OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/objd
47         MOC_DIR = ./src
48         LIBS = -L$$(QTDIR)/lib;$$(CASROOT)/win$$(ARCH)/$$(VCVER)/libd
49     } else {
50         DEFINES += NDEBUG
51         DESTDIR = ./win$(ARCH)/$(VCVER)/bin
52         OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
53         MOC_DIR = ./src
54         LIBS = -L$$(QTDIR)/lib;$$(CASROOT)/win$$(ARCH)/$$(VCVER)/lib
55     }
56 }
57
58 LIBS += -lTKernel -lTKMath -lTKBRep -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
59         -lTKTopAlgo -lTKMesh -lTKPrim -lTKCDF -lTKLCAF -lTKCAF -lTKBO
60
61 lrelease.name = LRELEASE ${QMAKE_FILE_IN}
62 lrelease.commands = lrelease ${QMAKE_FILE_IN} -qm $${RES_DIR}/${QMAKE_FILE_BASE}.qm
63 lrelease.output = ${QMAKE_FILE_BASE}.qm
64 lrelease.input = TS_FILES
65 lrelease.clean = $${RES_DIR}/${QMAKE_FILE_BASE}.qm
66 lrelease.CONFIG += no_link target_predeps
67 QMAKE_EXTRA_COMPILERS += lrelease
68
69 copy_res.name = Copy resource ${QMAKE_FILE_IN}
70 copy_res.output = ${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
71 copy_res.clean = $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
72 copy_res.input = RES_FILES
73 copy_res.CONFIG += no_link target_predeps
74 win32: copy_res.commands = type ${QMAKE_FILE_IN} > $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
75 unix:  copy_res.commands = cp -f ${QMAKE_FILE_IN} $${RES_DIR}
76 QMAKE_EXTRA_COMPILERS += copy_res
77 #QMAKE_CXXFLAGS += /wd4996
78
79 greaterThan(QT_MAJOR_VERSION, 4) {
80     QT += widgets
81 }