kima2/src/printer/CMakeLists.txt

24 lines
527 B
CMake
Raw Normal View History

set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.62 REQUIRED)
2018-08-10 10:45:50 +02:00
if(WIN32)
2018-08-15 13:55:48 +02:00
find_package(LIBUSB REQUIRED)
2018-08-10 10:45:50 +02:00
else()
2018-08-10 10:18:26 +02:00
find_package(PkgConfig REQUIRED)
2018-08-10 10:45:50 +02:00
pkg_check_modules(LibUSB REQUIRED libusb-1.0)
endif()
2018-08-05 21:51:30 +02:00
set(PRINTER_SOURCES
posprinter.cpp
2019-10-10 08:09:16 +02:00
utils.cpp
2018-08-05 21:51:30 +02:00
)
add_library(printer STATIC ${PRINTER_SOURCES})
2018-08-10 10:45:50 +02:00
if(WIN32)
2018-08-15 13:55:48 +02:00
target_link_libraries(printer core ${LIBUSB_1_LIBRARIES})
2018-08-10 10:45:50 +02:00
else()
target_link_libraries(printer core ${LibUSB_LIBRARIES})
endif()
2019-10-10 08:09:16 +02:00
target_include_directories(printer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/..)