mirror of
https://github.com/miracle-wm-org/miracle-wm.git
synced 2024-11-23 04:08:27 +03:00
65332344c5
- Refactored the `Node` concept into `LeafNode`s and `ParentNode`s so that we always know what we're working with - Implemented the concept of a `Node::commit_changes()` which is used at the end of a series of complex operations to push changes to the screen at the end. - Prepared the `TilingWindowTree` for testing, which will come next
77 lines
2.4 KiB
CMake
77 lines
2.4 KiB
CMake
cmake_minimum_required(VERSION 3.7)
|
|
cmake_policy(SET CMP0015 NEW)
|
|
cmake_policy(SET CMP0022 NEW)
|
|
|
|
project(miracle-wm)
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_CXX_COMPILER g++)
|
|
|
|
set(ENV{PKG_CONFIG_PATH} "/usr/local/lib/pkgconfig/")
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
find_package(PkgConfig)
|
|
pkg_check_modules(MIRAL miral REQUIRED)
|
|
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
|
pkg_check_modules(YAML REQUIRED IMPORTED_TARGET yaml-cpp)
|
|
pkg_check_modules(LIBEVDEV REQUIRED IMPORTED_TARGET libevdev)
|
|
find_package(nlohmann_json 3.2.0 REQUIRED)
|
|
pkg_check_modules(LIBNOTIFY REQUIRED IMPORTED_TARGET libnotify)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
add_library(miracle-wm-implementation
|
|
src/policy.cpp
|
|
src/tiling_window_tree.cpp
|
|
src/node.cpp
|
|
src/window_helpers.h
|
|
src/window_helpers.cpp
|
|
src/miracle_config.cpp
|
|
src/miracle_config.h
|
|
src/output_content.cpp
|
|
src/workspace_manager.cpp
|
|
src/ipc.cpp
|
|
src/auto_restarting_launcher.cpp
|
|
src/workspace_observer.cpp
|
|
src/window_metadata.cpp
|
|
src/workspace_content.cpp
|
|
src/leaf_node.cpp
|
|
src/parent_node.cpp
|
|
src/window_manager_tools_tiling_interface.cpp
|
|
)
|
|
|
|
add_executable(miracle-wm
|
|
src/main.cpp
|
|
)
|
|
|
|
target_include_directories(miracle-wm-implementation PUBLIC SYSTEM ${MIRAL_INCLUDE_DIRS})
|
|
target_link_libraries( miracle-wm-implementation ${MIRAL_LDFLAGS}
|
|
PkgConfig::YAML PkgConfig::GLIB PkgConfig::LIBEVDEV PkgConfig::LIBNOTIFY nlohmann_json::nlohmann_json)
|
|
|
|
target_link_libraries(miracle-wm miracle-wm-implementation)
|
|
target_include_directories(miracle-wm PUBLIC SYSTEM ${MIRAL_INCLUDE_DIRS})
|
|
target_link_libraries(miracle-wm ${MIRAL_LDFLAGS})
|
|
|
|
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/miracle-wm
|
|
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
)
|
|
|
|
configure_file(session/usr/local/share/wayland-sessions/miracle-wm-non-snap.desktop.in miracle-wm-non-snap.desktop @ONLY)
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/miracle-wm-non-snap.desktop
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/wayland-sessions)
|
|
|
|
add_custom_target(miracle-wm-sensible-terminal ALL
|
|
cp ${CMAKE_CURRENT_SOURCE_DIR}/src/miracle-wm-sensible-terminal ${CMAKE_BINARY_DIR}/bin
|
|
)
|
|
|
|
install(PROGRAMS
|
|
src/miracle-wm-sensible-terminal
|
|
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
)
|
|
|
|
add_subdirectory(tests/)
|