-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
47 lines (39 loc) · 1.32 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 2.8)
project(right_window_cpp)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -pedantic -Wfatal-errors -Werror -Wno-error=unused-variable -Wno-error=unused-but-set-variable")
include_directories("vendor")
find_package(X11 REQUIRED)
set(SOURCE_FILES
main.cpp
wm_abstract.h
directions.h
available_wm.h
available_wm.cpp
rw_util.h
find_next_window.h
find_next_window.cpp)
if (NOT DEFINED BSPWM_BUILD)
set(BSPWM_BUILD ON)
endif()
if (NOT DEFINED X11_BUILD)
set(X11_BUILD ON)
endif()
if (BSPWM_BUILD)
add_executable(right-window-bspwm ${SOURCE_FILES}
subprocess.cpp
bspwm/bspwm.h
bspwm/bspwm.cpp window_clipping.h)
set_target_properties(right-window-bspwm PROPERTIES COMPILE_FLAGS "-DUSE_BSPWM")
install(TARGETS right-window-bspwm
RUNTIME DESTINATION bin)
endif()
if (X11_BUILD)
add_executable(right-window-x11 ${SOURCE_FILES}
x11wm/x11wm.h
x11wm/x11wm.cpp)
set_target_properties(right-window-x11 PROPERTIES COMPILE_FLAGS "-DUSE_X11WM")
include_directories(right-window-x11 PUBLIC ${X11_INCLUDE_DIR})
target_link_libraries(right-window-x11 ${X11_LIBRARIES})
install(TARGETS right-window-x11
RUNTIME DESTINATION bin)
endif()