--- core/src/stored/CMakeLists.txt	2021-11-22 05:52:19.000000000 -0500
+++ core/src/stored/CMakeLists.txt	2022-01-15 09:50:59.125922000 -0500
@@ -226,23 +226,23 @@
   list(APPEND BAREOS_SD_LIBRARIES comctl32)
 endif()
 
-target_link_libraries(bareos-sd stored_objects ${BAREOS_SD_LIBRARIES})
+target_link_libraries(bareos-sd stored_objects ${BAREOS_SD_LIBRARIES} ${JANSSON_LIBRARIES} ${PTHREAD_LIBRARIES})
 
 add_executable(bls ${BLSSRCS})
-target_link_libraries(bls bareos bareossd bareosfind)
+target_link_libraries(bls bareos bareossd bareosfind ${JANSSON_LIBRARIES} ${PTHREAD_LIBRARIES})
 
 add_executable(bextract ${BEXTRACTSRS})
-target_link_libraries(bextract bareossd bareosfind bareos)
+target_link_libraries(bextract bareossd bareosfind bareos ${JANSSON_LIBRARIES} ${PTHREAD_LIBRARIES})
 
 add_executable(bscan ${BSCANSRCS})
-target_link_libraries(bscan bareos bareossd bareosfind bareossql bareoscats)
+target_link_libraries(bscan bareos bareossd bareosfind bareossql bareoscats ${JANSSON_LIBRARIES} ${PTHREAD_LIBRARIES})
 
 add_executable(btape ${BTAPESRCS})
-target_link_libraries(btape bareossd bareos)
+target_link_libraries(btape bareossd bareos ${JANSSON_LIBRARIES} ${PTHREAD_LIBRARIES})
 
 add_executable(bcopy ${BCOPYSRCS})
 
-target_link_libraries(bcopy bareossd bareos)
+target_link_libraries(bcopy bareossd bareos ${JANSSON_LIBRARIES} ${PTHREAD_LIBRARIES})
 
 install(TARGETS bareossd DESTINATION ${libdir})
 
