diff options
author | vaxerski <[email protected]> | 2022-03-16 20:50:55 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-03-16 20:50:55 +0100 |
commit | de4c836e97a5798a09bcf96fbdf4cbaf29b0dc5e (patch) | |
tree | ced2f8201e49f65e2ceecac015ecc3f7f8f9e10a /CMakeLists.txt | |
parent | f9862eed939c748842c0e9369880848b654f3d5f (diff) | |
download | Hyprland-de4c836e97a5798a09bcf96fbdf4cbaf29b0dc5e.tar.gz Hyprland-de4c836e97a5798a09bcf96fbdf4cbaf29b0dc5e.zip |
Initial Commit
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000..9d54972d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 3.4) +project(Hyprland + DESCRIPTION "A Modern C++ Wayland Compositor" +) + +set(CMAKE_MESSAGE_LOG_LEVEL "STATUS") + +message(STATUS "Configuring Hyprland!") + +include_directories(.) +add_compile_options(-std=c++20 -DWLR_USE_UNSTABLE ) +add_compile_options(-Wall -Wextra -Wno-unused-parameter) +find_package(Threads REQUIRED) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-server wayland-client wayland-cursor wayland-protocols cairo pango pangocairo libdrm egl xkbcommon wlroots libinput xcb) + +file(GLOB_RECURSE SRCFILES "src/*.cpp") + +add_executable(Hyprland ${SRCFILES}) + +IF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) + message(STATUS "Configuring Hyprland in Debug with CMake!") +ELSE() + add_compile_options(-Ofast) + message(STATUS "Configuring Hyprland in Release with CMake!") +ENDIF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) + +target_link_libraries(Hyprland rt) + +set(CPACK_PROJECT_NAME ${PROJECT_NAME}) +set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) +include(CPack) + +target_link_libraries(Hyprland PkgConfig::deps) + +target_link_libraries(Hyprland + wlroots + ${CMAKE_THREAD_LIBS_INIT} +) + +IF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -no-pie -fno-builtin") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg -no-pie -fno-builtin") + SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg -no-pie -fno-builtin") +ENDIF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
\ No newline at end of file |