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_FLAGS "-g")
set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD 99)
set(CMAKE_C_EXTENSIONS OFF) set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/bin") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_definitions( add_definitions(
-D_GNU_SOURCE -D_GNU_SOURCE
) )

View file

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

View file

@ -5,7 +5,6 @@ find_package(Cairo REQUIRED)
find_package(Pango REQUIRED) find_package(Pango REQUIRED)
include(Wayland) include(Wayland)
set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/)
WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell
"${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml" "${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml"
xdg-shell xdg-shell

View file

@ -5,7 +5,6 @@ find_package(Cairo REQUIRED)
find_package(Pango REQUIRED) find_package(Pango REQUIRED)
include(Wayland) include(Wayland)
set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/)
WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell WAYLAND_ADD_PROTOCOL_CLIENT(proto-xdg-shell
"${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml" "${PROJECT_SOURCE_DIR}/../protocols/xdg-shell.xml"
xdg-shell xdg-shell

View file

@ -1,7 +1,5 @@
project(swaygrab) project(swaygrab)
set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/)
file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c)
file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c)

View file

@ -1,7 +1,5 @@
project(swaymsg) project(swaymsg)
set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/../bin/)
file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c) file(GLOB sources ${PROJECT_SOURCE_DIR}/*.c)
file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c) file(GLOB common ${PROJECT_SOURCE_DIR}/../common/*.c)