cmake stuff
This commit is contained in:
parent
980f60c003
commit
27f36b4aa8
3 changed files with 27 additions and 25 deletions
|
@ -6,7 +6,9 @@ find_package(SQLite3 REQUIRED)
|
||||||
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)
|
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz)
|
||||||
FetchContent_MakeAvailable(json)
|
FetchContent_MakeAvailable(json)
|
||||||
|
|
||||||
set(CORE_SOURCES
|
add_library(core STATIC)
|
||||||
|
|
||||||
|
target_sources(core PRIVATE
|
||||||
database.cpp
|
database.cpp
|
||||||
entity.cpp
|
entity.cpp
|
||||||
entityint.cpp
|
entityint.cpp
|
||||||
|
@ -20,9 +22,6 @@ set(CORE_SOURCES
|
||||||
utils.cpp
|
utils.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
add_library(core STATIC ${CORE_SOURCES})
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json)
|
target_link_libraries(core PRIVATE sqlite3 nlohmann_json::nlohmann_json)
|
||||||
target_link_libraries(core PRIVATE bcrypt)
|
target_link_libraries(core PRIVATE bcrypt)
|
||||||
|
|
|
@ -21,27 +21,30 @@ FetchContent_Declare(
|
||||||
FetchContent_MakeAvailable(SingleApplication)
|
FetchContent_MakeAvailable(SingleApplication)
|
||||||
add_compile_definitions(QAPPLICATION_CLASS=${QAPPLICATION_CLASS})
|
add_compile_definitions(QAPPLICATION_CLASS=${QAPPLICATION_CLASS})
|
||||||
|
|
||||||
set(GUI_SOURCES
|
add_executable(kima2)
|
||||||
kima2.cpp
|
|
||||||
mainwindow.cpp
|
target_sources(kima2 PRIVATE
|
||||||
mainwindow.ui
|
kima2.cpp
|
||||||
sellerdialog.cpp
|
mainwindow.cpp
|
||||||
sellerdialog.ui
|
mainwindow.ui
|
||||||
sellermodel.cpp
|
sellerdialog.cpp
|
||||||
pricedialog.cpp
|
sellerdialog.ui
|
||||||
pricedialog.ui
|
sellermodel.cpp
|
||||||
basketmodel.cpp
|
pricedialog.cpp
|
||||||
salemodel.cpp
|
pricedialog.ui
|
||||||
reportdialog.cpp
|
basketmodel.cpp
|
||||||
reportdialog.ui
|
salemodel.cpp
|
||||||
reportmodel.cpp
|
reportdialog.cpp
|
||||||
settingsdialog.cpp
|
reportdialog.ui
|
||||||
settingsdialog.ui
|
reportmodel.cpp
|
||||||
../../kima2.qrc
|
settingsdialog.cpp
|
||||||
|
settingsdialog.ui
|
||||||
|
../../kima2.qrc
|
||||||
|
kima2.rc
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(kima2 ${GUI_SOURCES} kima2.rc)
|
|
||||||
target_include_directories(kima2 PRIVATE ${PROJECT_BINARY_DIR})
|
target_include_directories(kima2 PRIVATE ${PROJECT_BINARY_DIR})
|
||||||
|
|
||||||
target_link_libraries(kima2 core printer Qt::Core Qt::PrintSupport Qt::Network SingleApplication::SingleApplication)
|
target_link_libraries(kima2 core printer Qt::Core Qt::PrintSupport Qt::Network SingleApplication::SingleApplication)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
|
@ -10,9 +10,9 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(printer STATIC)
|
add_library(printer STATIC)
|
||||||
target_sources(printer
|
target_sources(printer PRIVATE
|
||||||
PRIVATE
|
posprinter.cpp
|
||||||
posprinter.cpp utils.cpp
|
utils.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
Loading…
Add table
Reference in a new issue