summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/BuildMacros.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/BuildMacros.cmake')
-rwxr-xr-xcmake/Modules/BuildMacros.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/Modules/BuildMacros.cmake b/cmake/Modules/BuildMacros.cmake
index 14a82fab7..3630d2e26 100755
--- a/cmake/Modules/BuildMacros.cmake
+++ b/cmake/Modules/BuildMacros.cmake
@@ -19,7 +19,7 @@ macro(build_executable exec)
cmake_parse_arguments(ARG
"NO_INSTALL"
"COMPONENT"
- "SOURCES;LINK_LIBRARIES;DEPENDS;DEFINITIONS"
+ "SOURCES;LINK_LIBRARIES;DEPENDS;INCLUDE_DIRS;DEFINITIONS"
${ARGN}
)
@@ -36,6 +36,13 @@ macro(build_executable exec)
target_compile_definitions(${exec} PRIVATE ${ARG_DEFINITIONS})
endif()
+ if(ARG_INCLUDE_DIRS)
+ target_include_directories(${exec} BEFORE PUBLIC
+ ${ARG_INCLUDE_DIRS}
+ ${PROJECT_BINARY_DIR}
+ )
+ endif()
+
if(NOT ARG_NO_INSTALL)
install(TARGETS ${exec} DESTINATION bin COMPONENT ${ARG_COMPONENT})
endif()