From 2dedf206d79a3ce9c44c3216a2b148a2172b78fa Mon Sep 17 00:00:00 2001 From: Christoph Gysin Date: Tue, 1 Dec 2015 21:14:27 +0200 Subject: [PATCH] cmake: use out-of-source build --- CMakeLists.txt | 3 +-- README.md | 4 +++- swaybar/CMakeLists.txt | 1 - swaybg/CMakeLists.txt | 1 - swaygrab/CMakeLists.txt | 2 -- swaymsg/CMakeLists.txt | 2 -- 6 files changed, 4 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 51209aea..9aeea48e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,7 @@ add_definitions('-DFALLBACK_CONFIG_DIR=\"${FALLBACK_CONFIG_DIR}\"') set(CMAKE_C_FLAGS "-g") set(CMAKE_C_STANDARD 99) set(CMAKE_C_EXTENSIONS OFF) -set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/bin") -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") add_definitions( -D_GNU_SOURCE ) diff --git a/README.md b/README.md index 4bbfa750..394dfc80 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,9 @@ Install dependencies: Run these commands: - cmake . + mkdir build + cd build + cmake .. make sudo make install diff --git a/swaybar/CMakeLists.txt b/swaybar/CMakeLists.txt index 1b68fd3e..260d6701 100644 --- a/swaybar/CMakeLists.txt +++ b/swaybar/CMakeLists.txt @@ -5,7 +5,6 @@ find_package(Cairo REQUIRED) find_package(Pango REQUIRED) include(Wayland) -set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell "${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml" xdg-shell diff --git a/swaybg/CMakeLists.txt b/swaybg/CMakeLists.txt index 9a54a32a..e4b69c18 100644 --- a/swaybg/CMakeLists.txt +++ b/swaybg/CMakeLists.txt @@ -5,7 +5,6 @@ find_package(Cairo REQUIRED) find_package(Pango REQUIRED) include(Wayland) -set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell "${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml" xdg-shell diff --git a/swaygrab/CMakeLists.txt b/swaygrab/CMakeLists.txt index 672a62cd..efe8986b 100644 --- a/swaygrab/CMakeLists.txt +++ b/swaygrab/CMakeLists.txt @@ -1,7 +1,5 @@ project(swaygrab) -set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) - file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) diff --git a/swaymsg/CMakeLists.txt b/swaymsg/CMakeLists.txt index 9231e9f4..2671dc2c 100644 --- a/swaymsg/CMakeLists.txt +++ b/swaymsg/CMakeLists.txt @@ -1,7 +1,5 @@ project(swaymsg) -set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/) - file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c)