cmake: use out-of-source build

This commit is contained in:
Christoph Gysin 2015-12-01 21:14:27 +02:00
parent a043c9030c
commit 2dedf206d7
6 changed files with 4 additions and 9 deletions

View file

@ -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
)

View file

@ -46,7 +46,9 @@ Install dependencies:
Run these commands:
cmake .
mkdir build
cd build
cmake ..
make
sudo make install

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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)