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