diff -Naur a/libsrc/boblightserver/CMakeLists.txt b/libsrc/boblightserver/CMakeLists.txt
--- a/libsrc/boblightserver/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/boblightserver/CMakeLists.txt	2016-10-19 14:11:32.946486260 -0700
@@ -37,4 +37,4 @@
 target_link_libraries(boblightserver
 	hyperion
 	hyperion-utils
-	${QT_LIBRARIES})
+	${QT_LIBRARIES} pthread pcre16 dl z)
diff -Naur a/libsrc/bonjour/CMakeLists.txt b/libsrc/bonjour/CMakeLists.txt
--- a/libsrc/bonjour/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/bonjour/CMakeLists.txt	2016-10-19 14:11:32.945486250 -0700
@@ -43,7 +43,7 @@
 target_link_libraries(bonjour
 		hyperion
 		hyperion-utils
-	${QT_LIBRARIES})
+	${QT_LIBRARIES} pthread pcre16 dl z)
 
 set(USE_SHARED_AVAHI_LIBS ${DEFAULT_USE_SHARED_AVAHI_LIBS} CACHE BOOL "use avahi libraries from system")
 
diff -Naur a/libsrc/effectengine/CMakeLists.txt b/libsrc/effectengine/CMakeLists.txt
--- a/libsrc/effectengine/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/effectengine/CMakeLists.txt	2016-10-19 14:11:32.946486260 -0700
@@ -51,5 +51,5 @@
 target_link_libraries(effectengine
 	hyperion
 	jsoncpp
-	${QT_LIBRARIES}
+	${QT_LIBRARIES} pthread pcre16 dl z
 	${PYTHON_LIBRARIES})
diff -Naur a/libsrc/grabber/amlogic/CMakeLists.txt b/libsrc/grabber/amlogic/CMakeLists.txt
--- a/libsrc/grabber/amlogic/CMakeLists.txt	2016-10-19 13:53:03.326320836 -0700
+++ b/libsrc/grabber/amlogic/CMakeLists.txt	2016-10-19 14:11:32.947486270 -0700
@@ -37,4 +37,4 @@
 
 target_link_libraries(amlogic-grabber
 	hyperion
-	${QT_LIBRARIES})
+	${QT_LIBRARIES} pthread pcre16 dl z)
diff -Naur a/libsrc/grabber/dispmanx/CMakeLists.txt b/libsrc/grabber/dispmanx/CMakeLists.txt
--- a/libsrc/grabber/dispmanx/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/grabber/dispmanx/CMakeLists.txt	2016-10-19 14:11:32.948486280 -0700
@@ -36,6 +36,6 @@
 
 target_link_libraries(dispmanx-grabber
 	hyperion
-	${QT_LIBRARIES}
+	${QT_LIBRARIES} pthread pcre16 dl z
 	${BCM_LIBRARIES}
 )
diff -Naur a/libsrc/grabber/framebuffer/CMakeLists.txt b/libsrc/grabber/framebuffer/CMakeLists.txt
--- a/libsrc/grabber/framebuffer/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/grabber/framebuffer/CMakeLists.txt	2016-10-19 14:11:32.948486280 -0700
@@ -36,4 +36,4 @@
 
 target_link_libraries(framebuffer-grabber
 	hyperion
-	${QT_LIBRARIES})
+	${QT_LIBRARIES} pthread pcre16 dl z)
diff -Naur a/libsrc/grabber/osx/CMakeLists.txt b/libsrc/grabber/osx/CMakeLists.txt
--- a/libsrc/grabber/osx/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/grabber/osx/CMakeLists.txt	2016-10-19 14:11:32.949486290 -0700
@@ -31,4 +31,4 @@
 
 target_link_libraries(osx-grabber
 	hyperion
-	${QT_LIBRARIES})
+	${QT_LIBRARIES} pthread pcre16 dl z)
diff -Naur a/libsrc/grabber/v4l2/CMakeLists.txt b/libsrc/grabber/v4l2/CMakeLists.txt
--- a/libsrc/grabber/v4l2/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/grabber/v4l2/CMakeLists.txt	2016-10-19 14:11:32.947486270 -0700
@@ -35,5 +35,5 @@
 
 target_link_libraries(v4l2-grabber
 	hyperion
-	${QT_LIBRARIES}
+	${QT_LIBRARIES} pthread pcre16 dl z
 )
diff -Naur a/libsrc/grabber/x11/CMakeLists.txt b/libsrc/grabber/x11/CMakeLists.txt
--- a/libsrc/grabber/x11/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/grabber/x11/CMakeLists.txt	2016-10-19 14:11:32.948486280 -0700
@@ -37,5 +37,5 @@
 
 target_link_libraries(x11-grabber
 	hyperion
-	${QT_LIBRARIES}
+	${QT_LIBRARIES} pthread pcre16 dl z
 )
diff -Naur a/libsrc/hyperion/CMakeLists.txt b/libsrc/hyperion/CMakeLists.txt
--- a/libsrc/hyperion/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/hyperion/CMakeLists.txt	2016-10-19 14:11:32.944486240 -0700
@@ -68,5 +68,5 @@
 	leddevice
 	effectengine
 	serialport
-	${QT_LIBRARIES}
+	${QT_LIBRARIES} pthread pcre16 dl z
 )
diff -Naur a/libsrc/jsonserver/CMakeLists.txt b/libsrc/jsonserver/CMakeLists.txt
--- a/libsrc/jsonserver/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/jsonserver/CMakeLists.txt	2016-10-19 14:11:32.946486260 -0700
@@ -45,4 +45,4 @@
 	hyperion
 	hyperion-utils
 	jsoncpp
-	${QT_LIBRARIES})
+	${QT_LIBRARIES} pthread pcre16 dl z)
diff -Naur a/libsrc/leddevice/CMakeLists.txt b/libsrc/leddevice/CMakeLists.txt
--- a/libsrc/leddevice/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/leddevice/CMakeLists.txt	2016-10-19 14:11:32.947486270 -0700
@@ -152,7 +152,7 @@
 	serialport
 	${LIBUSB_1_LIBRARIES} #apt-get install libusb-1.0-0-dev
 	${CMAKE_THREAD_LIBS_INIT}
-	${QT_LIBRARIES}
+	${QT_LIBRARIES} pthread pcre16 dl z
 )
 
 if(ENABLE_TINKERFORGE)
diff -Naur a/libsrc/protoserver/CMakeLists.txt b/libsrc/protoserver/CMakeLists.txt
--- a/libsrc/protoserver/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/protoserver/CMakeLists.txt	2016-10-19 14:11:32.944486240 -0700
@@ -57,5 +57,5 @@
 	hyperion
 	hyperion-utils
 	protobuf
-	${QT_LIBRARIES}
+	${QT_LIBRARIES} pthread pcre16 dl z
 )
diff -Naur a/libsrc/utils/CMakeLists.txt b/libsrc/utils/CMakeLists.txt
--- a/libsrc/utils/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/utils/CMakeLists.txt	2016-10-19 14:11:32.945486250 -0700
@@ -55,4 +55,4 @@
 
 target_link_libraries(hyperion-utils
 	jsoncpp
-	${QT_LIBRARIES})
+	${QT_LIBRARIES} pthread pcre16 dl z)
diff -Naur a/libsrc/webconfig/CMakeLists.txt b/libsrc/webconfig/CMakeLists.txt
--- a/libsrc/webconfig/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/webconfig/CMakeLists.txt	2016-10-19 14:11:32.949486290 -0700
@@ -49,7 +49,7 @@
 target_link_libraries(webconfig
 	hyperion
 	hyperion-utils
-	${QT_LIBRARIES}
+	${QT_LIBRARIES} pthread pcre16 dl z
 )
 
 
diff -Naur a/libsrc/xbmcvideochecker/CMakeLists.txt b/libsrc/xbmcvideochecker/CMakeLists.txt
--- a/libsrc/xbmcvideochecker/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/libsrc/xbmcvideochecker/CMakeLists.txt	2016-10-19 14:11:32.945486250 -0700
@@ -34,4 +34,4 @@
 
 target_link_libraries(xbmcvideochecker
 	hyperion
-	${QT_LIBRARIES})
+	${QT_LIBRARIES} pthread pcre16 dl z)
diff -Naur a/src/hyperion-remote/CMakeLists.txt b/src/hyperion-remote/CMakeLists.txt
--- a/src/hyperion-remote/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/src/hyperion-remote/CMakeLists.txt	2016-10-19 15:05:59.050877759 -0700
@@ -34,7 +34,8 @@
 target_link_libraries(${PROJECT_NAME}
 	jsoncpp
 	getoptPlusPlus
-	${QT_LIBRARIES})
+	hyperion
+	${QT_LIBRARIES} pthread pcre16 dl z)
 
 if(ENABLE_QT5)
 	qt5_use_modules(${PROJECT_NAME} Widgets Core Network)
diff -Naur a/src/hyperion-v4l2/CMakeLists.txt b/src/hyperion-v4l2/CMakeLists.txt
--- a/src/hyperion-v4l2/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/src/hyperion-v4l2/CMakeLists.txt	2016-10-19 14:11:32.950486300 -0700
@@ -51,7 +51,7 @@
 	hyperion-utils
 	protoserver
 	pthread
-	${QT_LIBRARIES}
+	${QT_LIBRARIES} pthread pcre16 dl z
 )
 
 if(ENABLE_QT5)
diff -Naur a/test/CMakeLists.txt b/test/CMakeLists.txt
--- a/test/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/test/CMakeLists.txt	2016-10-19 14:11:32.955486350 -0700
@@ -47,11 +47,11 @@
 
 add_executable(test_qregexp TestQRegExp.cpp)
 target_link_libraries(test_qregexp
-		${QT_LIBRARIES})
+		${QT_LIBRARIES} pthread pcre16 dl z)
 
 add_executable(test_qtscreenshot TestQtScreenshot.cpp)
 target_link_libraries(test_qtscreenshot
-		${QT_LIBRARIES})
+		${QT_LIBRARIES} pthread pcre16 dl z)
 
 if(ENABLE_QT5)
 qt5_use_modules(test_qregexp Widgets)
@@ -63,7 +63,7 @@
     find_package(X11 REQUIRED)
 
     add_executable(test_x11performance TestX11Performance.cpp)
-	target_link_libraries(test_x11performance ${X11_LIBRARIES} ${QT_LIBRARIES})
+	target_link_libraries(test_x11performance ${X11_LIBRARIES} ${QT_LIBRARIES} pthread pcre16 dl z)
 if(ENABLE_QT5)
 qt5_use_modules(test_x11performance Widgets)
 endif(ENABLE_QT5)
diff -Naur a/test/dispmanx2png/CMakeLists.txt b/test/dispmanx2png/CMakeLists.txt
--- a/test/dispmanx2png/CMakeLists.txt	2016-07-17 23:44:37.000000000 -0700
+++ b/test/dispmanx2png/CMakeLists.txt	2016-10-19 14:11:32.955486350 -0700
@@ -16,4 +16,4 @@
 target_link_libraries(dispmanx2png
 		dispmanx-grabber
 		getoptPlusPlus
-		${QT_LIBRARIES})
+		${QT_LIBRARIES} pthread pcre16 dl z)
