summaryrefslogtreecommitdiffstats
path: root/tools/viewer/viewer.pro
blob: 64f58ed747c68c7d29aa904309683cee777241ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
CONFIG += VIEWER_BUILD

include($$PWD/../../commoninclude.pri)

TEMPLATE = app
TARGET = Qt3DViewer
QT += studio3d-private
!android: {
    QT += qml quickcontrols2
}

INCLUDEPATH += $$PWD/../../src/api/studio3dqml
INCLUDEPATH += $$PWD/../../src/api/studio3d

RESOURCES += Viewer.qrc
RC_ICONS = resources/images/3D-studio-viewer.ico

ICON = resources/images/viewer.icns

SOURCES += \
    $$PWD/../../src/api/studio3dqml/q3dsstudio3d.cpp \
    $$PWD/../../src/api/studio3dqml/q3dsrenderer.cpp \
    $$PWD/../../src/api/studio3dqml/q3dspresentationitem.cpp \
    $$PWD/../../src/api/studio3dqml/q3dsruntimeinitializerthread.cpp \
    main.cpp \
    viewer.cpp \
    remotedeploymentreceiver.cpp

HEADERS += \
    $$PWD/../../src/api/studio3dqml/q3dsstudio3d_p.h \
    $$PWD/../../src/api/studio3dqml/q3dsrenderer_p.h \
    $$PWD/../../src/api/studio3dqml/q3dspresentationitem_p.h \
    $$PWD/../../src/api/studio3dqml/q3dsruntimeinitializerthread_p.h \
    viewer.h \
    remotedeploymentreceiver.h

android: {
SOURCES += \
    $$PWD/../../src/api/studio3d/q3dsviewersettings.cpp \
    $$PWD/../../src/api/studio3d/q3dspresentation.cpp \
    $$PWD/../../src/api/studio3d/q3dsdatainput.cpp

HEADERS += \
    $$PWD/../../src/api/studio3d/q3dsviewersettings.h \
    $$PWD/../../src/api/studio3d/q3dspresentation.h \
    $$PWD/../../src/api/studio3d/q3dsdatainput.h
}

!android {
LIBS += \
    -lqt3dsopengl$$qtPlatformTargetSuffix() \
    -lqt3dsqmlstreamer$$qtPlatformTargetSuffix()
}

macos:QMAKE_RPATHDIR += @executable_path/../../../../lib

target.path = $$[QT_INSTALL_BINS]
INSTALLS += target

DISTFILES += \
    android/AndroidManifest.xml \
    android/build.gradle \
    android/gradle/wrapper/gradle-wrapper.jar \
    android/gradle/wrapper/gradle-wrapper.properties \
    android/gradlew \
    android/gradlew.bat \
    android/res/values/libs.xml

contains(ANDROID_TARGET_ARCH,armeabi-v7a) {
    ANDROID_PACKAGE_SOURCE_DIR = \
        $$PWD/android
}

contains(ANDROID_TARGET_ARCH,arm64-v8a) {
    ANDROID_PACKAGE_SOURCE_DIR = \
        $$PWD/android
}

android {
    # qt prl files contain hard coded paths to android ndk so don't link against them
    # If libraries are missing because of this they need to be added separately
    CONFIG -= link_prl
    LIBS += \
        $$OUT_PWD/../../lib/libqt3dsopengl$$qtPlatformTargetSuffix().so \
        $$OUT_PWD/../../lib/libqt3dsqmlstreamer$$qtPlatformTargetSuffix().so

    QT += quick
}