From a827cc80d4e6f1e633f3989bcd6ba7f869375864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 26 Jan 2019 12:30:14 +0100 Subject: [PATCH] cmake: make sure we can find i3/ipc.h There's no pkg-config file shipped with i3, so our only option is to manually look for the file (and assume it can be found in the "normal" include paths). --- modules/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 8952c96..d4dc54f 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -34,6 +34,10 @@ add_library(clock ${lib_type} clock.c) target_link_libraries(clock module-sdk) pkg_check_modules(JSON REQUIRED json-c) +find_file(I3_IPC_H i3/ipc.h) +if (NOT I3_IPC_H) + message(FATAL_ERROR "cannot find header file: i3/ipc.h") +endif () add_library(i3 ${lib_type} i3.c) target_compile_options(i3 PRIVATE ${JSON_CFLAGS_OTHER}) target_include_directories(i3 PRIVATE ${JSON_INCLUDE_DIRS})