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