2022-07-19 07:28:07 +00:00
|
|
|
project(Sandbox)
|
|
|
|
|
|
|
|
find_package(
|
|
|
|
Qt5
|
|
|
|
COMPONENTS Core Quick QuickControls2
|
|
|
|
REQUIRED)
|
|
|
|
|
2022-10-27 10:54:23 +00:00
|
|
|
file(GLOB_RECURSE QML_FILES "../*.qml" "../qmldir")
|
2022-07-19 07:28:07 +00:00
|
|
|
file(GLOB_RECURSE JS_FILES "../*.js")
|
2023-02-03 16:36:07 +00:00
|
|
|
|
|
|
|
set(HEADERS sandboxapp.h)
|
|
|
|
set(SOURCES main.cpp sandboxapp.cpp)
|
|
|
|
|
|
|
|
set(STATUSQ_DIR ..)
|
|
|
|
set(STATUSQ_HEADERS
|
|
|
|
${STATUSQ_DIR}/include/StatusQ/statuswindow.h
|
|
|
|
${STATUSQ_DIR}/include/StatusQ/typesregistration.h
|
|
|
|
)
|
|
|
|
|
|
|
|
set(STATUSQ_SOURCES
|
|
|
|
${STATUSQ_DIR}/src/statuswindow.cpp
|
|
|
|
${STATUSQ_DIR}/src/typesregistration.cpp
|
|
|
|
)
|
|
|
|
|
2022-07-21 09:04:07 +00:00
|
|
|
if(APPLE)
|
2023-02-03 16:36:07 +00:00
|
|
|
list(APPEND STATUSQ_SOURCES
|
|
|
|
${STATUSQ_DIR}/src/statuswindow_osx.mm
|
|
|
|
)
|
2022-07-21 09:04:07 +00:00
|
|
|
else()
|
2023-02-03 16:36:07 +00:00
|
|
|
list(APPEND STATUSQ_SOURCES
|
|
|
|
${STATUSQ_DIR}/src/statuswindow_other.cpp
|
|
|
|
)
|
2022-07-21 09:04:07 +00:00
|
|
|
endif()
|
2022-07-19 07:28:07 +00:00
|
|
|
|
2022-10-26 18:33:50 +00:00
|
|
|
set(QRC_FILES qml.qrc ../src/statusq.qrc ../src/assets.qrc)
|
|
|
|
qt5_add_big_resources(QRC_COMPILED ${QRC_FILES})
|
2022-07-19 07:28:07 +00:00
|
|
|
|
|
|
|
add_executable(
|
|
|
|
${PROJECT_NAME}
|
2022-07-21 09:04:07 +00:00
|
|
|
${HEADERS}
|
|
|
|
${SOURCES}
|
2023-02-03 16:36:07 +00:00
|
|
|
${STATUSQ_HEADERS}
|
|
|
|
${STATUSQ_SOURCES}
|
2022-07-19 07:28:07 +00:00
|
|
|
${QRC_FILES}
|
2022-10-26 18:33:50 +00:00
|
|
|
${QRC_COMPILED}
|
2022-07-19 07:28:07 +00:00
|
|
|
${QML_FILES}
|
|
|
|
${JS_FILES})
|
|
|
|
|
2023-02-03 16:36:07 +00:00
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC ${STATUSQ_DIR}/include)
|
2022-07-19 07:28:07 +00:00
|
|
|
target_compile_definitions(${PROJECT_NAME}
|
|
|
|
PRIVATE SRC_DIR="${CMAKE_CURRENT_LIST_DIR}")
|
2022-07-19 10:29:18 +00:00
|
|
|
target_link_libraries(
|
|
|
|
${PROJECT_NAME} PRIVATE Qt5::Core Qt5::Quick Qt5::QuickControls2
|
|
|
|
SortFilterProxyModel)
|
2022-07-21 09:04:07 +00:00
|
|
|
|
|
|
|
if (APPLE)
|
|
|
|
find_library(AppKit AppKit)
|
|
|
|
find_library(Foundation Foundation)
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${AppKit} ${Foundation})
|
|
|
|
endif()
|