Commit acc3ad56 authored by Thiago Santini's avatar Thiago Santini

Adds initial Linux support

parent df64cea1
Temporary file to hold instructions for the Linux port.
1) General dependencies
$sudo apt-get install libusb-1.0-0 libusb-1.0-0-dev
...@@ -37,46 +37,47 @@ unix { ...@@ -37,46 +37,47 @@ unix {
} }
# Dependencies # Dependencies
LIBUSBPATH = "C:/Users/santini/repo/libusb/"
LIBUVCPATH = "C:/Users/santini/repo/libuvc/" win32:{
LIBPTHREADSPATH = "C:/Users/santini/repo/libuvc/pthreads-2.9.1/" LIBUSBPATH = "C:/Users/santini/repo/libusb/"
LIBUVCPATH = "C:/Users/santini/repo/libuvc/"
# Libraries required to access pupil lab's cameras LIBPTHREADSPATH = "C:/Users/santini/repo/libuvc/pthreads-2.9.1/"
# LIBUSB-1.0
INCLUDEPATH += "$${LIBUSBPATH}/libusb/" # Libraries required to access pupil lab's cameras
win32:contains(QMAKE_HOST.arch, x86_64) { # LIBUSB-1.0
INCLUDEPATH += "$${LIBUSBPATH}/libusb/"
contains(QMAKE_HOST.arch, x86_64) {
Release:LIBS += "-L$${LIBUSBPATH}/x64/Release/dll" Release:LIBS += "-L$${LIBUSBPATH}/x64/Release/dll"
Debug:LIBS += "-L$${LIBUSBPATH}/x64/Debug/dll" Debug:LIBS += "-L$${LIBUSBPATH}/x64/Debug/dll"
} else { } else {
Release:LIBS += "-L$${LIBUSBPATH}/x86/Release/dll" Release:LIBS += "-L$${LIBUSBPATH}/x86/Release/dll"
Debug:LIBS += "-L$${LIBUSBPATH}/x86/Debug/dll" Debug:LIBS += "-L$${LIBUSBPATH}/x86/Debug/dll"
} }
LIBS += -llibusb-1.0 LIBS += -llibusb-1.0
# LIBUVC # LIBUVC
INCLUDEPATH += "$${LIBUVCPATH}/install/include/" INCLUDEPATH += "$${LIBUVCPATH}/install/include/"
win32:contains(QMAKE_HOST.arch, x86_64) { contains(QMAKE_HOST.arch, x86_64) {
Release:LIBS += "-L$${LIBUVCPATH}/build/Release/" Release:LIBS += "-L$${LIBUVCPATH}/build/Release/"
Debug:LIBS += "-L$${LIBUVCPATH}/build/Debug" Debug:LIBS += "-L$${LIBUVCPATH}/build/Debug"
} else { } else {
Release:LIBS += "-L$${LIBUVCPATH}/build/Release/" Release:LIBS += "-L$${LIBUVCPATH}/build/Release/"
Debug:LIBS += "-L$${LIBUVCPATH}/build/Debug" Debug:LIBS += "-L$${LIBUVCPATH}/build/Debug"
} }
LIBS += -luvc LIBS += -luvc
# PTHREADS # PTHREADS
INCLUDEPATH += "$${LIBPTHREADSPATH}/include/" INCLUDEPATH += "$${LIBPTHREADSPATH}/include/"
win32:contains(QMAKE_HOST.arch, x86_64) { contains(QMAKE_HOST.arch, x86_64) {
Release:LIBS += "-L$${LIBPTHREADSPATH}/lib/x64/" Release:LIBS += "-L$${LIBPTHREADSPATH}/lib/x64/"
Debug:LIBS += "-L$${LIBPTHREADSPATH}/lib/x64/" Debug:LIBS += "-L$${LIBPTHREADSPATH}/lib/x64/"
} else { } else {
Release:LIBS += "-L$${LIBPTHREADSPATH}/lib/x86/" Release:LIBS += "-L$${LIBPTHREADSPATH}/lib/x86/"
Debug:LIBS += "-L$${LIBPTHREADSPATH}/lib/x86/" Debug:LIBS += "-L$${LIBPTHREADSPATH}/lib/x86/"
} }
LIBS += -lpthreadVC2 LIBS += -lpthreadVC2
# Work around for bad visual studio update (msvc14) # Work around for bad visual studio update (msvc14)
win32{
INCLUDEPATH += "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10240.0/ucrt" INCLUDEPATH += "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10240.0/ucrt"
contains(QMAKE_HOST.arch, x86_64) { contains(QMAKE_HOST.arch, x86_64) {
LIBS += -L"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x64" LIBS += -L"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x64"
...@@ -84,3 +85,18 @@ win32{ ...@@ -84,3 +85,18 @@ win32{
LIBS += -L"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x86" LIBS += -L"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x86"
} }
} }
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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment