From 99d30d5bb742eedd96d66a353fea84625ae80a51 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 20 Jun 2018 22:00:03 +0100 Subject: [PATCH] CMake tweak: include headers in targets This improves navigation in XCode (any maybe some other tools) --- CMakeModules/SimGearComponent.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeModules/SimGearComponent.cmake b/CMakeModules/SimGearComponent.cmake index 00944de3..bf7a550f 100644 --- a/CMakeModules/SimGearComponent.cmake +++ b/CMakeModules/SimGearComponent.cmake @@ -12,6 +12,11 @@ macro(simgear_component_common name includePath sourcesList sources headers) set_property(GLOBAL APPEND PROPERTY PUBLIC_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}") set(fh${sourcesList} "${fh${sourcesList}}#${CMAKE_CURRENT_SOURCE_DIR}/${h}") + + # also append headers to the sources list, so that IDEs find the files + # correctly (otherwise they are not in the project) + set_property(GLOBAL + APPEND PROPERTY ${sourcesList} "${CMAKE_CURRENT_SOURCE_DIR}/${h}") endforeach() set_property(GLOBAL APPEND PROPERTY FG_GROUPS_${sourcesList}_C "${fc${sourcesList}}@")