2015-12-02 07:25:22 +11:00
|
|
|
include_directories(
|
2015-12-02 16:57:53 +11:00
|
|
|
${PROTOCOLS_INCLUDE_DIRS}
|
2015-12-02 07:25:22 +11:00
|
|
|
${WLC_INCLUDE_DIRS}
|
|
|
|
${PCRE_INCLUDE_DIRS}
|
|
|
|
${JSONC_INCLUDE_DIRS}
|
|
|
|
${XKBCOMMON_INCLUDE_DIRS}
|
2016-01-22 15:17:33 +11:00
|
|
|
${LIBINPUT_INCLUDE_DIRS}
|
2016-01-29 00:39:51 +11:00
|
|
|
${CAIRO_INCLUDE_DIRS}
|
|
|
|
${PANGO_INCLUDE_DIRS}
|
2016-04-29 04:08:41 +10:00
|
|
|
${WAYLAND_INCLUDE_DIR}
|
2015-12-02 07:25:22 +11:00
|
|
|
)
|
|
|
|
|
2016-09-02 12:39:08 +10:00
|
|
|
file(GLOB cmds
|
|
|
|
"commands/*.c"
|
|
|
|
"commands/bar/*.c"
|
|
|
|
"commands/input/*.c"
|
|
|
|
)
|
|
|
|
|
2015-12-02 07:25:22 +11:00
|
|
|
add_executable(sway
|
2015-12-02 16:57:53 +11:00
|
|
|
commands.c
|
2016-09-02 12:39:08 +10:00
|
|
|
${cmds}
|
2015-12-02 16:57:53 +11:00
|
|
|
config.c
|
|
|
|
container.c
|
|
|
|
criteria.c
|
|
|
|
debug_log.c
|
|
|
|
extensions.c
|
|
|
|
focus.c
|
|
|
|
handlers.c
|
2016-01-17 21:53:37 +11:00
|
|
|
input.c
|
2015-12-02 16:57:53 +11:00
|
|
|
input_state.c
|
2016-07-05 04:34:44 +10:00
|
|
|
ipc-json.c
|
2015-12-02 16:57:53 +11:00
|
|
|
ipc-server.c
|
|
|
|
layout.c
|
|
|
|
main.c
|
|
|
|
output.c
|
|
|
|
workspace.c
|
2016-03-29 23:47:30 +11:00
|
|
|
border.c
|
2016-12-02 11:58:11 +11:00
|
|
|
security.c
|
2015-12-02 07:25:22 +11:00
|
|
|
)
|
|
|
|
|
2016-01-22 07:04:52 +11:00
|
|
|
add_definitions(
|
|
|
|
-DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}"
|
|
|
|
)
|
|
|
|
|
2015-12-02 07:25:22 +11:00
|
|
|
target_link_libraries(sway
|
2015-12-02 16:57:53 +11:00
|
|
|
sway-common
|
|
|
|
sway-protocols
|
2016-03-29 23:47:30 +11:00
|
|
|
sway-wayland
|
2015-12-02 07:25:22 +11:00
|
|
|
${WLC_LIBRARIES}
|
|
|
|
${XKBCOMMON_LIBRARIES}
|
|
|
|
${PCRE_LIBRARIES}
|
|
|
|
${JSONC_LIBRARIES}
|
|
|
|
${WAYLAND_SERVER_LIBRARIES}
|
2016-01-17 21:53:37 +11:00
|
|
|
${LIBINPUT_LIBRARIES}
|
2016-01-29 00:39:51 +11:00
|
|
|
${PANGO_LIBRARIES}
|
|
|
|
${JSONC_LIBRARIES}
|
2015-12-22 22:36:20 +11:00
|
|
|
m
|
2015-12-02 07:25:22 +11:00
|
|
|
)
|
|
|
|
|
2016-12-08 23:34:08 +11:00
|
|
|
if (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
|
|
|
target_link_libraries(sway cap)
|
|
|
|
endif (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
|
|
|
|
2015-12-02 07:25:22 +11:00
|
|
|
install(
|
|
|
|
TARGETS sway
|
|
|
|
RUNTIME
|
|
|
|
DESTINATION bin
|
|
|
|
COMPONENT runtime
|
|
|
|
)
|
2016-12-03 07:56:36 +11:00
|
|
|
|
|
|
|
add_custom_target(configs ALL)
|
|
|
|
|
|
|
|
function(add_config name source destination)
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
|
|
|
|
COMMAND sed -r
|
|
|
|
's?__PREFIX__?${CMAKE_INSTALL_PREFIX}?g\; s?__SYSCONFDIR__?${CMAKE_INSTALL_FULL_SYSCONFDIR}?g'
|
|
|
|
${PROJECT_SOURCE_DIR}/${source}.in > ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
|
|
|
|
DEPENDS ${PROJECT_SOURCE_DIR}/${source}.in
|
|
|
|
COMMENT "Generating config file ${source}"
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}
|
|
|
|
DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/${destination}
|
|
|
|
COMPONENT configuration
|
|
|
|
)
|
|
|
|
|
|
|
|
add_custom_target(config-${name} DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name})
|
|
|
|
add_dependencies(configs config-${name})
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
add_config(config config sway)
|
|
|
|
add_config(security config.d/security sway/config.d)
|
2015-12-02 21:47:34 +11:00
|
|
|
|
|
|
|
add_manpage(sway 1)
|
|
|
|
add_manpage(sway 5)
|
2016-01-23 05:15:03 +11:00
|
|
|
add_manpage(sway-input 5)
|
2016-03-18 01:35:43 +11:00
|
|
|
add_manpage(sway-bar 5)
|
2016-12-03 02:05:43 +11:00
|
|
|
add_manpage(sway-security 7)
|