From 8d780bb872e9ac055970fef3767573c5db428dce Mon Sep 17 00:00:00 2001 From: Viktor Govako Date: Thu, 18 Aug 2022 12:06:41 +0300 Subject: [PATCH] [cmake] Added include_directories to suppress gflags.h QTCreator warning. Signed-off-by: Viktor Govako --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1de5728162..47c02e373f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -295,7 +295,14 @@ set(EXPAT_SHARED_LIBS OFF) add_subdirectory(3party/expat/expat) add_subdirectory(3party/agg) add_subdirectory(3party/bsdiff-courgette) + add_subdirectory(3party/gflags) +# Not needed for the usual build process, but it fixes QtCreator editor, +# that doesn't see gflags/gflags.h in binary dir (gflags has tricky cmake configuration). +if (PLATFORM_DESKTOP) + include_directories("${PROJECT_BINARY_DIR}/3party/gflags/include") +endif() + if (LINUX_DETECTED) find_package(ICU COMPONENTS uc i18n data REQUIRED) find_package(Freetype REQUIRED)