Skip to content

Commit 36f210e

Browse files
committed
build BUGFIX config header installation
1 parent 8f84952 commit 36f210e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,14 @@ find_package(PCRE2 10.21 REQUIRED)
306306
include_directories(${PCRE2_INCLUDE_DIRS})
307307
target_link_libraries(yang ${PCRE2_LIBRARIES})
308308

309-
# install files
309+
# generated header list
310+
foreach(h IN LISTS gen_headers)
311+
list(APPEND g_headers ${PROJECT_BINARY_DIR}/${h})
312+
endforeach()
313+
314+
# install all library files
310315
install(TARGETS yang DESTINATION ${CMAKE_INSTALL_LIBDIR})
311-
install(FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${gen_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libyang)
316+
install(FILES ${headers} ${g_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libyang)
312317

313318
find_package(PkgConfig)
314319
if(PKG_CONFIG_FOUND)

0 commit comments

Comments
 (0)