aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-01-21 12:03:14 +0000
committerGerrit Code Review <gerrit@fd.io>2019-01-21 12:03:14 +0000
commit29fb58203e5a44dbfafc6b788f50ca412c5f3c4b (patch)
tree5d7cac00e1d824ae52999bb036610e6e75d199c2 /cmake
parentc7f942175b8c25c77ddc21561b52e3e6b5620b80 (diff)
parent9e5f41ed6ebe64a789916794626485460078c420 (diff)
Merge "- Code style fix - Improved vpp binary api interface - Correction in object pool destructor - Fix error in Memif Connector"
Diffstat (limited to '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()