From 468ddfb34dd16408ae068f0fb922c75c13df2ef3 Mon Sep 17 00:00:00 2001 From: Tomáš Čech Date: Thu, 28 Apr 2016 20:08:41 +0200 Subject: Fix missing include paths When headers were installed in more sofisticated places (but package config knows it right), it revealed missing paths in CMake configuration. Lets fix it. --- common/CMakeLists.txt | 1 + protocols/CMakeLists.txt | 1 + sway/CMakeLists.txt | 1 + swaybar/CMakeLists.txt | 3 ++- swaybg/CMakeLists.txt | 3 ++- swaygrab/CMakeLists.txt | 1 + swaylock/CMakeLists.txt | 3 ++- wayland/CMakeLists.txt | 1 + 8 files changed, 11 insertions(+), 3 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index e5b8f2b9..901a47f9 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1,5 +1,6 @@ include_directories( ${WLC_INCLUDE_DIRS} + ${XKBCOMMON_INCLUDE_DIRS} ) add_library(sway-common diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt index d7516d0c..0ff7c704 100644 --- a/protocols/CMakeLists.txt +++ b/protocols/CMakeLists.txt @@ -31,3 +31,4 @@ add_library(sway-protocols ) set(PROTOCOLS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/protocols PARENT_SCOPE) +INCLUDE_DIRECTORIES(${WAYLAND_INCLUDE_DIR} ${XKBCOMMON_INCLUDE_DIRS}) diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt index 51f27a05..73df3b1b 100644 --- a/sway/CMakeLists.txt +++ b/sway/CMakeLists.txt @@ -7,6 +7,7 @@ include_directories( ${LIBINPUT_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} + ${WAYLAND_INCLUDE_DIR} ) add_executable(sway diff --git a/swaybar/CMakeLists.txt b/swaybar/CMakeLists.txt index 5b865083..f59a48fd 100644 --- a/swaybar/CMakeLists.txt +++ b/swaybar/CMakeLists.txt @@ -1,9 +1,10 @@ include_directories( ${PROTOCOLS_INCLUDE_DIRS} - ${WAYLAND_CLIENT_INCLUDE_DIR} + ${WAYLAND_INCLUDE_DIR} ${CAIRO_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} ${JSONC_INCLUDE_DIRS} + ${XKBCOMMON_INCLUDE_DIRS} ) add_executable(swaybar diff --git a/swaybg/CMakeLists.txt b/swaybg/CMakeLists.txt index c5efae91..f8cad404 100644 --- a/swaybg/CMakeLists.txt +++ b/swaybg/CMakeLists.txt @@ -1,8 +1,9 @@ include_directories( ${PROTOCOLS_INCLUDE_DIRS} - ${WAYLAND_CLIENT_INCLUDE_DIR} + ${WAYLAND_INCLUDE_DIR} ${CAIRO_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} + ${XKBCOMMON_INCLUDE_DIRS} ) add_executable(swaybg diff --git a/swaygrab/CMakeLists.txt b/swaygrab/CMakeLists.txt index 888a9aee..b4aee357 100644 --- a/swaygrab/CMakeLists.txt +++ b/swaygrab/CMakeLists.txt @@ -1,6 +1,7 @@ include_directories( ${JSONC_INCLUDE_DIRS} ${WLC_INCLUDE_DIRS} + ${XKBCOMMON_INCLUDE_DIRS} ) add_executable(swaygrab diff --git a/swaylock/CMakeLists.txt b/swaylock/CMakeLists.txt index b290cd2f..febbd1af 100644 --- a/swaylock/CMakeLists.txt +++ b/swaylock/CMakeLists.txt @@ -1,10 +1,11 @@ include_directories( ${PROTOCOLS_INCLUDE_DIRS} - ${WAYLAND_CLIENT_INCLUDE_DIR} + ${WAYLAND_INCLUDE_DIR} ${CAIRO_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} ${PAM_INCLUDE_DIRS} ${JSONC_INCLUDE_DIRS} + ${XKBCOMMON_INCLUDE_DIRS} ) add_executable(swaylock diff --git a/wayland/CMakeLists.txt b/wayland/CMakeLists.txt index 282ea1aa..df92db9e 100644 --- a/wayland/CMakeLists.txt +++ b/wayland/CMakeLists.txt @@ -2,6 +2,7 @@ include_directories( ${PROTOCOLS_INCLUDE_DIRS} ${PANGO_INCLUDE_DIRS} ${XKBCOMMON_INCLUDE_DIRS} + ${WAYLAND_INCLUDE_DIR} ) add_library(sway-wayland -- cgit v1.2.3-70-g09d2 From bcdeb721893264d4c9c3471c3955ae20ce1b6e89 Mon Sep 17 00:00:00 2001 From: Tomáš Čech Date: Thu, 28 Apr 2016 20:13:26 +0200 Subject: Explicitly mark static linking in CMake When no type is given, it depends on BUILD_SHARED_LIBS value which is not desired in this case. --- common/CMakeLists.txt | 2 +- protocols/CMakeLists.txt | 2 +- wayland/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 901a47f9..9c2c0a99 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -3,7 +3,7 @@ include_directories( ${XKBCOMMON_INCLUDE_DIRS} ) -add_library(sway-common +add_library(sway-common STATIC ipc-client.c list.c log.c diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt index 0ff7c704..ff0a2e4d 100644 --- a/protocols/CMakeLists.txt +++ b/protocols/CMakeLists.txt @@ -22,7 +22,7 @@ WAYLAND_ADD_PROTOCOL_SERVER(proto-server-swaylock swaylock ) -add_library(sway-protocols +add_library(sway-protocols STATIC ${proto-client-xdg-shell} ${proto-client-desktop-shell} ${proto-server-desktop-shell} diff --git a/wayland/CMakeLists.txt b/wayland/CMakeLists.txt index df92db9e..54fe3e23 100644 --- a/wayland/CMakeLists.txt +++ b/wayland/CMakeLists.txt @@ -5,7 +5,7 @@ include_directories( ${WAYLAND_INCLUDE_DIR} ) -add_library(sway-wayland +add_library(sway-wayland STATIC buffers.c pango.c registry.c -- cgit v1.2.3-70-g09d2 From 1124e78dda3e5c77fdd5ec5b8f6a45ce644aaa06 Mon Sep 17 00:00:00 2001 From: Tomáš Čech Date: Thu, 28 Apr 2016 20:19:40 +0200 Subject: Respect supplied CMAKE_C_FLAGS --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf4fe49b..cf115b3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.1.0) project(sway C) -set(CMAKE_C_FLAGS "-g") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") set(CMAKE_C_STANDARD 99) set(CMAKE_C_EXTENSIONS OFF) set(CMAKE_POSITION_INDEPENDENT_CODE ON) -- cgit v1.2.3-70-g09d2