[cmake] move generated header file to PROJECT_BINARY_DIR (#4112)

Credit to Robert Lubos for the suggestion.
This commit is contained in:
Jonathan Hui
2019-11-26 00:53:35 +08:00
parent 11074f7829
commit 889584c42c
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -57,6 +57,7 @@ if(NOT OT_PLATFORM IN_LIST OT_EXAMPLE_PLATFORMS)
message(FATAL_ERROR "Platform unknown: ${OT_PLATFORM}")
endif()
list(APPEND OT_PUBLIC_INCLUDES ${PROJECT_BINARY_DIR}/etc/cmake)
list(APPEND OT_PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/etc/cmake)
list(APPEND OT_PUBLIC_INCLUDES ${PROJECT_SOURCE_DIR}/include)
if(NOT OT_PLATFORM MATCHES "none")
+1 -1
View File
@@ -32,4 +32,4 @@ check_function_exists("strlcat" HAVE_STRLCAT)
check_function_exists("strlcpy" HAVE_STRLCPY)
check_function_exists("strnlen" HAVE_STRNLEN)
configure_file(${PROJECT_SOURCE_DIR}/etc/cmake/openthread-config-generic.h.in ${PROJECT_SOURCE_DIR}/etc/cmake/openthread-config-generic.h)
configure_file(${PROJECT_SOURCE_DIR}/etc/cmake/openthread-config-generic.h.in ${PROJECT_BINARY_DIR}/etc/cmake/openthread-config-generic.h)