0027344: Configuration, CMake: bugs with detecting third-party products
[occt.git] / samples / qt / FuncDemo / FuncDemo.pro
1 TEMPLATE = app
2 CONFIG += debug_and_release qt
3
4 TARGET = FuncDemo
5
6 SAMPLESROOT = $$quote($$(CSF_OCCTSamplesPath)/qt)
7
8 HEADERS = src/*.h
9 SOURCES = src/*.cpp
10
11 INCLUDEPATH += $$quote($$(CSF_OCCTIncludePath))
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     } else {
49         DEFINES += NDEBUG
50         DESTDIR = ./win$(ARCH)/$(VCVER)/bin
51         OBJECTS_DIR = ./win$(ARCH)/$(VCVER)/obj
52         MOC_DIR = ./src
53     }
54     LIBS = -L$$(QTDIR)/lib;$$(CSF_OCCTLibPath)
55 }
56
57 LIBS += -lTKernel -lTKMath -lTKBRep -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d \
58         -lTKTopAlgo -lTKMesh -lTKPrim -lTKCDF -lTKLCAF -lTKCAF -lTKBO
59
60 lrelease.name = LRELEASE ${QMAKE_FILE_IN}
61 lrelease.commands = lrelease ${QMAKE_FILE_IN} -qm $${RES_DIR}/${QMAKE_FILE_BASE}.qm
62 lrelease.output = ${QMAKE_FILE_BASE}.qm
63 lrelease.input = TS_FILES
64 lrelease.clean = $${RES_DIR}/${QMAKE_FILE_BASE}.qm
65 lrelease.CONFIG += no_link target_predeps
66 QMAKE_EXTRA_COMPILERS += lrelease
67
68 copy_res.name = Copy resource ${QMAKE_FILE_IN}
69 copy_res.output = ${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
70 copy_res.clean = $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
71 copy_res.input = RES_FILES
72 copy_res.CONFIG += no_link target_predeps
73 win32: copy_res.commands = type ${QMAKE_FILE_IN} > $${RES_DIR}/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
74 unix:  copy_res.commands = cp -f ${QMAKE_FILE_IN} $${RES_DIR}
75 QMAKE_EXTRA_COMPILERS += copy_res
76 #QMAKE_CXXFLAGS += /wd4996
77
78 greaterThan(QT_MAJOR_VERSION, 4) {
79     QT += widgets
80 }