2024-01-09 02:42:04 +03:00
|
|
|
cmake_minimum_required(VERSION 3.7)
|
2023-12-28 21:31:57 +03:00
|
|
|
cmake_policy(SET CMP0015 NEW)
|
|
|
|
cmake_policy(SET CMP0022 NEW)
|
|
|
|
|
|
|
|
project(miracle-wm)
|
2023-02-18 20:06:27 +03:00
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_CXX_COMPILER g++)
|
|
|
|
|
2023-02-18 22:09:01 +03:00
|
|
|
set(ENV{PKG_CONFIG_PATH} "/usr/local/lib/pkgconfig/")
|
2023-02-18 20:06:27 +03:00
|
|
|
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)
|
|
|
|
|
2023-02-18 21:10:42 +03:00
|
|
|
find_package(PkgConfig)
|
|
|
|
pkg_check_modules(MIRAL miral REQUIRED)
|
2024-01-28 19:18:36 +03:00
|
|
|
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
|
|
|
pkg_check_modules(YAML REQUIRED IMPORTED_TARGET yaml-cpp)
|
2024-01-30 02:10:02 +03:00
|
|
|
pkg_check_modules(LIBEVDEV REQUIRED IMPORTED_TARGET libevdev)
|
2024-02-22 02:54:59 +03:00
|
|
|
find_package(nlohmann_json 3.2.0 REQUIRED)
|
2024-02-26 21:48:59 +03:00
|
|
|
pkg_check_modules(LIBNOTIFY REQUIRED IMPORTED_TARGET libnotify)
|
2023-02-18 21:10:42 +03:00
|
|
|
|
2024-02-25 18:27:29 +03:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
2024-03-10 23:40:26 +03:00
|
|
|
add_library(miracle-wm-implementation
|
2024-04-02 22:09:21 +03:00
|
|
|
STATIC
|
2024-03-02 15:47:11 +03:00
|
|
|
src/policy.cpp
|
2024-04-02 21:19:57 +03:00
|
|
|
src/tiling_window_tree.cpp
|
2023-12-01 01:41:41 +03:00
|
|
|
src/node.cpp
|
2024-01-07 16:19:28 +03:00
|
|
|
src/window_helpers.h
|
|
|
|
src/window_helpers.cpp
|
2024-01-28 18:52:28 +03:00
|
|
|
src/miracle_config.cpp
|
|
|
|
src/miracle_config.h
|
2024-03-02 15:47:11 +03:00
|
|
|
src/output_content.cpp
|
2024-02-07 16:05:09 +03:00
|
|
|
src/workspace_manager.cpp
|
2024-02-22 02:54:59 +03:00
|
|
|
src/ipc.cpp
|
2024-02-15 22:09:27 +03:00
|
|
|
src/auto_restarting_launcher.cpp
|
2024-02-22 02:54:59 +03:00
|
|
|
src/workspace_observer.cpp
|
2024-02-25 23:08:01 +03:00
|
|
|
src/window_metadata.cpp
|
2024-03-02 15:47:11 +03:00
|
|
|
src/workspace_content.cpp
|
2024-04-02 21:19:57 +03:00
|
|
|
src/leaf_node.cpp
|
|
|
|
src/parent_node.cpp
|
|
|
|
src/window_manager_tools_tiling_interface.cpp
|
2023-10-27 23:26:34 +03:00
|
|
|
)
|
2023-02-18 21:25:18 +03:00
|
|
|
|
2024-03-10 23:40:26 +03:00
|
|
|
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}
|
2024-02-26 21:55:41 +03:00
|
|
|
PkgConfig::YAML PkgConfig::GLIB PkgConfig::LIBEVDEV PkgConfig::LIBNOTIFY nlohmann_json::nlohmann_json)
|
2023-12-28 21:31:57 +03:00
|
|
|
|
2024-03-10 23:40:26 +03:00
|
|
|
target_include_directories(miracle-wm PUBLIC SYSTEM ${MIRAL_INCLUDE_DIRS})
|
2024-04-02 22:09:21 +03:00
|
|
|
target_link_libraries(miracle-wm PUBLIC ${MIRAL_LDFLAGS} PRIVATE miracle-wm-implementation)
|
2024-03-10 23:40:26 +03:00
|
|
|
|
2023-12-28 21:31:57 +03:00
|
|
|
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/miracle-wm
|
2024-02-25 18:27:29 +03:00
|
|
|
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
2023-12-28 21:48:11 +03:00
|
|
|
)
|
2024-01-09 02:42:04 +03:00
|
|
|
|
2024-04-02 22:09:21 +03:00
|
|
|
configure_file(session/usr/local/share/wayland-sessions/miracle-wm.desktop.in miracle-wm.desktop @ONLY)
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/miracle-wm.desktop
|
2024-02-25 18:27:29 +03:00
|
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/wayland-sessions)
|
2024-01-17 00:36:37 +03:00
|
|
|
|
2024-02-26 21:48:59 +03:00
|
|
|
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}
|
|
|
|
)
|
|
|
|
|
2024-01-15 18:56:41 +03:00
|
|
|
add_subdirectory(tests/)
|