diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 1297e28..52a2894 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -2,11 +2,14 @@ set(Boost_USE_STATIC_LIBS ON) find_package(Boost 1.62 COMPONENTS date_time REQUIRED) find_package(SQLite3 REQUIRED) -#find_package(PkgConfig REQUIRED) -find_package(XLNT REQUIRED STATIC) -find_package(JSONCPP REQUIRED) -#pkg_check_modules(XLNT REQUIRED xlnt>=1.3) -#pkg_check_modules(JSONCPP REQUIRED jsoncpp) +if (MINGW) + find_package(XLNT REQUIRED STATIC) + find_package(JSONCPP REQUIRED) +else (MINGW) + find_package(PkgConfig REQUIRED) + pkg_check_modules(XLNT REQUIRED xlnt>=1.3) + pkg_check_modules(JSONCPP REQUIRED jsoncpp) +endif (MINGW) set(CORE_SOURCES database.cpp @@ -25,4 +28,4 @@ target_link_libraries(core Boost::boost Boost::date_time sqlite3 ${XLNT_LIBRARY} if (WIN32) target_link_libraries(core bcrypt) endif() -target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file +target_include_directories(core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/printer/CMakeLists.txt b/src/printer/CMakeLists.txt index 20d65fd..ebdde40 100644 --- a/src/printer/CMakeLists.txt +++ b/src/printer/CMakeLists.txt @@ -2,7 +2,12 @@ set(Boost_USE_STATIC_LIBS ON) find_package(Boost 1.62 REQUIRED) -find_package(LibUSB REQUIRED) +if (MINGW) + find_package(LibUSB REQUIRED) +else (MINGW) + find_package(PkgConfig REQUIRED) + pkg_check_modules(LIBUSB REQUIRED libusb-1.0) +endif (MINGW) set(PRINTER_SOURCES posprinter.cpp @@ -10,4 +15,4 @@ set(PRINTER_SOURCES add_library(printer STATIC ${PRINTER_SOURCES}) target_link_libraries(printer core ${LIBUSB_1_LIBRARIES}) -target_include_directories(printer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file +target_include_directories(printer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})