diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 52a2894..823c7b2 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -24,8 +24,11 @@ set(CORE_SOURCES ) add_library(core STATIC ${CORE_SOURCES}) -target_link_libraries(core Boost::boost Boost::date_time sqlite3 ${XLNT_LIBRARY} ${JSONCPP_LIBRARY}) if (WIN32) + target_link_libraries(core Boost::boost Boost::date_time sqlite3 ${XLNT_LIBRARY} ${JSONCPP_LIBRARY}) target_link_libraries(core bcrypt) +else() + target_link_libraries(core Boost::boost Boost::date_time sqlite3 ${XLNT_LIBRARIES} ${JSONCPP_LIBRARIES}) endif() + target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/printer/CMakeLists.txt b/src/printer/CMakeLists.txt index ebdde40..3ce7ac2 100644 --- a/src/printer/CMakeLists.txt +++ b/src/printer/CMakeLists.txt @@ -2,17 +2,21 @@ set(Boost_USE_STATIC_LIBS ON) find_package(Boost 1.62 REQUIRED) -if (MINGW) +if(WIN32) find_package(LibUSB REQUIRED) -else (MINGW) +else() find_package(PkgConfig REQUIRED) - pkg_check_modules(LIBUSB REQUIRED libusb-1.0) -endif (MINGW) + pkg_check_modules(LibUSB REQUIRED libusb-1.0) +endif() set(PRINTER_SOURCES posprinter.cpp ) add_library(printer STATIC ${PRINTER_SOURCES}) -target_link_libraries(printer core ${LIBUSB_1_LIBRARIES}) +if(WIN32) + target_link_libraries(printer core ${LibUSB_1_LIBRARIES}) +else() + target_link_libraries(printer core ${LibUSB_LIBRARIES}) +endif() target_include_directories(printer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})