2024-01-25 12:33:02 +00:00
|
|
|
cmake_minimum_required(VERSION 3.20)
|
2024-02-12 10:16:22 +00:00
|
|
|
project(quickshell VERSION "0.0.1")
|
2024-01-25 12:33:02 +00:00
|
|
|
|
|
|
|
set(QT_MIN_VERSION "6.6.0")
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2024-03-02 13:05:45 +00:00
|
|
|
option(TESTS "Build tests" OFF)
|
|
|
|
|
|
|
|
option(SOCKETS "Enable unix socket support" ON)
|
2024-02-20 11:12:05 +00:00
|
|
|
option(WAYLAND "Enable wayland support" ON)
|
2024-02-29 09:30:57 +00:00
|
|
|
option(WAYLAND_WLR_LAYERSHELL "Support the zwlr_layer_shell_v1 wayland protocol" ON)
|
|
|
|
option(WAYLAND_SESSION_LOCK "Support the ext_session_lock_v1 wayland protocol" ON)
|
|
|
|
|
|
|
|
message(STATUS "Quickshell configuration")
|
2024-03-02 13:05:45 +00:00
|
|
|
message(STATUS " Build tests: ${TESTS}")
|
|
|
|
message(STATUS " Sockets: ${SOCKETS}")
|
2024-02-29 09:30:57 +00:00
|
|
|
message(STATUS " Wayland: ${WAYLAND}")
|
|
|
|
if (WAYLAND)
|
|
|
|
message(STATUS " Wlroots Layershell: ${WAYLAND_WLR_LAYERSHELL}")
|
|
|
|
message(STATUS " Session Lock: ${WAYLAND_SESSION_LOCK}")
|
|
|
|
endif ()
|
2024-02-20 11:12:05 +00:00
|
|
|
|
2024-01-25 12:33:02 +00:00
|
|
|
add_compile_options(-Wall -Wextra)
|
|
|
|
|
|
|
|
# nix workaround
|
|
|
|
if (CMAKE_EXPORT_COMPILE_COMMANDS)
|
|
|
|
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT CMAKE_BUILD_TYPE)
|
|
|
|
message(STATUS "CMAKE_BUILD_TYPE unset, defaulting to Debug.")
|
|
|
|
set(CMAKE_BUILD_TYPE Debug)
|
|
|
|
endif()
|
|
|
|
|
2024-02-20 11:12:05 +00:00
|
|
|
set(QT_DEPS Qt6::Gui Qt6::Qml Qt6::Quick Qt6::QuickControls2)
|
|
|
|
set(QT_FPDEPS Gui Qml Quick QuickControls2)
|
|
|
|
|
2024-03-02 13:05:45 +00:00
|
|
|
if (TESTS)
|
|
|
|
enable_testing()
|
|
|
|
list(APPEND QT_FPDEPS Test)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (SOCKETS)
|
|
|
|
list(APPEND QT_DEPS Qt6::Network)
|
|
|
|
list(APPEND QT_FPDEPS Network)
|
|
|
|
endif()
|
|
|
|
|
2024-02-20 11:12:05 +00:00
|
|
|
if (WAYLAND)
|
|
|
|
list(APPEND QT_DEPS Qt6::WaylandClient Qt6::WaylandClientPrivate)
|
|
|
|
list(APPEND QT_FPDEPS WaylandClient)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
find_package(Qt6 REQUIRED COMPONENTS ${QT_FPDEPS})
|
2024-02-05 01:25:27 +00:00
|
|
|
|
2024-01-25 12:33:02 +00:00
|
|
|
qt_standard_project_setup(REQUIRES 6.6)
|
|
|
|
|
2024-02-19 08:52:03 +00:00
|
|
|
add_subdirectory(src/core)
|
2024-03-03 09:59:31 +00:00
|
|
|
add_subdirectory(src/io)
|
2024-02-29 09:30:57 +00:00
|
|
|
|
|
|
|
if (WAYLAND)
|
|
|
|
add_subdirectory(src/wayland)
|
|
|
|
endif ()
|