Skip to content

Commit 8d42c35

Browse files
committed
build UPDATE copy all public headers into a binary dir
... to allow standard include paths to work even if the library is not installed.
1 parent 3299b5c commit 8d42c35

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,10 @@ if ("${BUILD_TYPE_UPPER}" STREQUAL "DEBUG")
322322
source_format_enable(0.77)
323323
endif()
324324

325-
# generate files
325+
# generate and copy all public header files
326326
configure_file(${PROJECT_SOURCE_DIR}/src/ly_config.h.in ${PROJECT_BINARY_DIR}/libyang/ly_config.h @ONLY)
327327
configure_file(${PROJECT_SOURCE_DIR}/src/version.h.in ${PROJECT_BINARY_DIR}/libyang/version.h @ONLY)
328+
file(COPY ${headers} DESTINATION ${PROJECT_BINARY_DIR}/libyang)
328329

329330
# DOC-only target with no extra dependencies
330331
if("${BUILD_TYPE_UPPER}" STREQUAL "DOCONLY")

0 commit comments

Comments
 (0)