uvcengine.pro 3.18 KB
Newer Older
Thiago C. Santini's avatar
Thiago C. Santini committed
1 2 3 4 5 6 7 8 9 10 11 12 13
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-16T18:53:42
#
#-------------------------------------------------

TOP = $$PWD

QT       += core gui multimedia

TARGET = uvcengine
TEMPLATE = lib
CONFIG += plugin
Thiago Santini's avatar
Thiago Santini committed
14
CONFIG += force_debug_info
Thiago C. Santini's avatar
Thiago C. Santini committed
15 16 17 18 19 20 21 22 23

DESTDIR = $$[QT_INSTALL_PLUGINS]/mediaservice

SOURCES += uvcserviceplugin.cpp \
    uvccameraservice.cpp \
    uvcvideodevicecontrol.cpp \
    uvccameracontrol.cpp \
    uvccamerasession.cpp \
    uvcvideorenderercontrol.cpp \
24
    uvccameraviewfindersettingscontrol.cpp \
Thiago Santini's avatar
Thiago Santini committed
25 26
    uvccameraimageprocessingcontrol.cpp \
    uvccameraexposurecontrol.cpp
Thiago C. Santini's avatar
Thiago C. Santini committed
27 28 29 30 31 32 33

HEADERS += uvcserviceplugin.h \
    uvccameraservice.h \
    uvcvideodevicecontrol.h \
    uvccameracontrol.h \
    uvccamerasession.h \
    uvcvideorenderercontrol.h \
34
    uvccameraviewfindersettingscontrol.h \
Thiago Santini's avatar
Thiago Santini committed
35 36
    uvccameraimageprocessingcontrol.h \
    uvccameraexposurecontrol.h
Thiago C. Santini's avatar
Thiago C. Santini committed
37 38 39 40 41 42 43
DISTFILES += uvcengine.json

unix {
    target.path = /usr/lib
    INSTALLS += target
}

44
# Dependencies
Thiago Santini's avatar
Thiago Santini committed
45 46

win32:{
47 48 49
		LIBUSBPATH = "C:/Users/santini/repo/libusb/"
		LIBUVCPATH = "C:/Users/santini/repo/libuvc/"
		LIBPTHREADSPATH = "C:/Users/santini/repo/libuvc/pthreads-2.9.1/"
Thiago Santini's avatar
Thiago Santini committed
50 51 52 53 54

        # Libraries required to access pupil lab's cameras
        # LIBUSB-1.0
        INCLUDEPATH += "$${LIBUSBPATH}/libusb/"
        contains(QMAKE_HOST.arch, x86_64) {
55 56
				Release:LIBS += "-L$${LIBUSBPATH}/x64/Release/dll"
				Debug:LIBS += "-L$${LIBUSBPATH}/x64/Debug/dll"
Thiago Santini's avatar
Thiago Santini committed
57
        } else {
58 59
				Release:LIBS += "-L$${LIBUSBPATH}/x86/Release/dll"
				Debug:LIBS += "-L$${LIBUSBPATH}/x86/Debug/dll"
Thiago Santini's avatar
Thiago Santini committed
60 61 62 63
        }
        LIBS += -llibusb-1.0

        # LIBUVC
64 65 66
		INCLUDEPATH += "$${LIBUVCPATH}/include/"
		INCLUDEPATH += "$${LIBUVCPATH}/build/include/"
		contains(QMAKE_HOST.arch, x86_64) {
Thiago Santini's avatar
Thiago Santini committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
            Release:LIBS += "-L$${LIBUVCPATH}/build/Release/"
            Debug:LIBS += "-L$${LIBUVCPATH}/build/Debug"
        } else {
            Release:LIBS += "-L$${LIBUVCPATH}/build/Release/"
            Debug:LIBS += "-L$${LIBUVCPATH}/build/Debug"
        }
        LIBS += -luvc

        # PTHREADS
        INCLUDEPATH += "$${LIBPTHREADSPATH}/include/"
        contains(QMAKE_HOST.arch, x86_64) {
            Release:LIBS += "-L$${LIBPTHREADSPATH}/lib/x64/"
            Debug:LIBS += "-L$${LIBPTHREADSPATH}/lib/x64/"
        } else {
            Release:LIBS += "-L$${LIBPTHREADSPATH}/lib/x86/"
            Debug:LIBS += "-L$${LIBPTHREADSPATH}/lib/x86/"
        }
                LIBS += -lpthreadVC2

        # Work around for bad visual studio update (msvc14)
        INCLUDEPATH += "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10240.0/ucrt"
        contains(QMAKE_HOST.arch, x86_64) {
                LIBS += -L"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x64"
        } else {
                LIBS += -L"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x86"
        }
Thiago C. Santini's avatar
Thiago C. Santini committed
93
}
Thiago Santini's avatar
Thiago Santini committed
94 95 96 97 98 99 100 101 102 103 104 105 106 107

unix:{
        LIBUVCPATH = "/home/santini/repo/libuvc/install/"

        # Libraries required to access pupil lab's cameras

        # LIBUVC
        INCLUDEPATH += "$${LIBUVCPATH}/include/"
        LIBS += "-L$${LIBUVCPATH}/lib/"
        LIBS += -luvc

        # System PTHREAD and LIBUSB libs are used
        LIBS += -lpthread
        LIBS += -lusb-1.0
Thiago C. Santini's avatar
Thiago C. Santini committed
108
}