2022-10-04 20:25:14 +00:00
|
|
|
cmake_minimum_required(VERSION 3.19)
|
|
|
|
project(Storybook)
|
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2022-10-14 10:53:04 +00:00
|
|
|
if (APPLE)
|
|
|
|
set(MACOS_VERSION_MIN_FLAGS -mmacosx-version-min=10.14)
|
|
|
|
set(CMAKE_OSX_ARCHITECTURES "x86_64")
|
|
|
|
endif()
|
|
|
|
|
2022-10-04 20:25:14 +00:00
|
|
|
find_package(
|
|
|
|
Qt5
|
|
|
|
COMPONENTS Core Quick QuickControls2
|
|
|
|
REQUIRED)
|
|
|
|
|
2022-10-18 18:47:41 +00:00
|
|
|
file(GLOB_RECURSE QML_FILES "stubs/*.qml" "mocks/*.qml" "pages/*.qml" "src/*.qml" "src/qmldir" "../ui/StatusQ/*.qml" "../ui/app/*.qml")
|
2022-10-04 20:25:14 +00:00
|
|
|
file(GLOB_RECURSE JS_FILES "../ui/StatusQ/*.js" "../ui/app/*.js")
|
|
|
|
|
|
|
|
add_executable(
|
|
|
|
${PROJECT_NAME}
|
2022-10-13 14:25:15 +00:00
|
|
|
main.cpp
|
2022-10-18 18:47:41 +00:00
|
|
|
cachecleaner.cpp cachecleaner.h
|
|
|
|
directorieswatcher.cpp directorieswatcher.h
|
|
|
|
${QML_FILES} main.qml
|
2022-10-04 20:25:14 +00:00
|
|
|
${JS_FILES}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_definitions(${PROJECT_NAME}
|
|
|
|
PRIVATE SRC_DIR="${CMAKE_CURRENT_LIST_DIR}")
|
|
|
|
target_link_libraries(
|
|
|
|
${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick Qt5::QuickControls2
|
|
|
|
SortFilterProxyModel)
|
|
|
|
|
2022-10-18 18:47:41 +00:00
|
|
|
set(QML_IMPORT_PATH "${CMAKE_SOURCE_DIR}/src" CACHE STRING "" FORCE)
|
2022-10-11 09:26:24 +00:00
|
|
|
|
2022-10-04 20:25:14 +00:00
|
|
|
if (APPLE)
|
|
|
|
find_library(AppKit AppKit)
|
|
|
|
find_library(Foundation Foundation)
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${AppKit} ${Foundation})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_subdirectory(../ui/StatusQ/vendor/SortFilterProxyModel ./SortFilterProxyModel)
|