cmake_minimum_required(VERSION 3.24) project(commodity) include(../3rdparty/QxOrm/QxOrm.cmake) set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ../plugins) set(CMAKE_CXX_STANDARD 17) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) find_package(Qt6 COMPONENTS Core Gui Widgets REQUIRED) add_library(commodity SHARED commodity.cpp commodity.h commodity_global.h commodityform.cpp commodityform.h commodityform.ui commoditygrid.cpp commoditygrid.h commodityrc.qrc commodityservice.cpp commodityservice.h commoditysettingsform.cpp commoditysettingsform.h commoditysettingsform.ui commoditytablemodel.cpp commoditytablemodel.h data/commodity-data.h data/commoditydata.cpp data/commoditydata.h data/commoditytypedata.cpp data/commoditytypedata.h settings/commoditysettings.cpp settings/commoditysettings.h coloritemdelegate.cpp coloritemdelegate.h) target_compile_definitions(commodity PRIVATE -DCOMMODITY_LIBRARY) include_directories(../core) include_directories(../shop) target_link_libraries(commodity Qt::Core Qt::Gui Qt::Widgets qdecimal decnumber QxOrm core shop ) install(TARGETS commodity LIBRARY DESTINATION ../plugins)