set(Boost_USE_STATIC_LIBS ON) find_package(Boost 1.62 REQUIRED) find_package(LibUSB REQUIRED) set(PRINTER_SOURCES posprinter.cpp ) add_library(printer STATIC ${PRINTER_SOURCES}) target_link_libraries(printer core ${LIBUSB_1_LIBRARIES}) target_include_directories(printer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})