53 lines
1.6 KiB
CMake
53 lines
1.6 KiB
CMake
cmake_minimum_required(VERSION 3.24)
|
|
project(prodejna-root)
|
|
|
|
include(CTest)
|
|
option(ENABLE_ZINT "Enable LimeReport barcode support" ON)
|
|
option(ENABLE_EET_V4 "Enable EET v4 integration" OFF)
|
|
|
|
set(EETCPP_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/EetCpp" CACHE PATH
|
|
"Path to the EetCpp source tree when EET v4 integration is enabled")
|
|
|
|
find_package(Qt6 6.12 REQUIRED COMPONENTS Core Core5Compat Test Gui Widgets PrintSupport Sql Qml Network Xml Svg)
|
|
|
|
set(CMAKE_POLICY_VERSION_MINIMUM 3.10)
|
|
|
|
if(ENABLE_EET_V4)
|
|
if(NOT EETCPP_SOURCE_DIR)
|
|
message(FATAL_ERROR
|
|
"ENABLE_EET_V4 requires EETCPP_SOURCE_DIR pointing to the EetCpp source tree")
|
|
endif()
|
|
if(NOT EXISTS "${EETCPP_SOURCE_DIR}/CMakeLists.txt")
|
|
message(FATAL_ERROR
|
|
"EETCPP_SOURCE_DIR does not contain a CMakeLists.txt: ${EETCPP_SOURCE_DIR}")
|
|
endif()
|
|
|
|
set(EETCPP_BUILD_PLAYGROUND OFF CACHE BOOL
|
|
"Build the EetCpp Playground CLI" FORCE)
|
|
set(_prodejna_build_testing "${BUILD_TESTING}")
|
|
set(BUILD_TESTING OFF)
|
|
add_subdirectory("${EETCPP_SOURCE_DIR}"
|
|
"${CMAKE_BINARY_DIR}/_deps/eetcpp-build"
|
|
EXCLUDE_FROM_ALL)
|
|
set(BUILD_TESTING "${_prodejna_build_testing}")
|
|
endif()
|
|
|
|
add_subdirectory(3rdparty/qdecimal)
|
|
add_subdirectory(3rdparty/QxOrm)
|
|
set(USE_QT6 ON CACHE BOOL "Build LimeReport with Qt6" FORCE)
|
|
add_subdirectory(3rdparty/LimeReport)
|
|
|
|
add_subdirectory(core)
|
|
add_subdirectory(application)
|
|
add_subdirectory(countryregister)
|
|
add_subdirectory(addressbook)
|
|
add_subdirectory(postregister)
|
|
add_subdirectory(services)
|
|
add_subdirectory(shop)
|
|
add_subdirectory(commodity)
|
|
add_subdirectory(camp)
|
|
|
|
if(BUILD_TESTING)
|
|
add_subdirectory(tests)
|
|
endif()
|