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)
|
|
|
|
|
2023-12-28 18:56:38 +03:00
|
|
|
add_executable(miracle-wm
|
2023-10-27 23:26:34 +03:00
|
|
|
src/main.cpp
|
|
|
|
src/miracle_window_management_policy.cpp
|
2023-11-19 19:30:05 +03:00
|
|
|
src/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
|
2023-10-27 23:26:34 +03:00
|
|
|
)
|
2023-02-18 21:25:18 +03:00
|
|
|
|
2023-12-28 18:56:38 +03:00
|
|
|
target_include_directories(miracle-wm PUBLIC SYSTEM ${MIRAL_INCLUDE_DIRS})
|
2023-12-28 21:31:57 +03:00
|
|
|
target_link_libraries( miracle-wm ${MIRAL_LDFLAGS})
|
|
|
|
|
|
|
|
install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/miracle-wm
|
|
|
|
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
|
2023-12-28 21:48:11 +03:00
|
|
|
)
|
2024-01-09 02:42:04 +03:00
|
|
|
|
2024-01-17 00:36:37 +03:00
|
|
|
install(FILES session/usr/local/share/wayland-sessions/miracle-wm-non-snap.desktop
|
|
|
|
DESTINATION /usr/share/wayland-sessions)
|
|
|
|
|
2024-01-15 18:56:41 +03:00
|
|
|
add_subdirectory(tests/)
|