Skip to content

Commit

Permalink
build UPDATE generate headers with install dir structure
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvasko committed Apr 8, 2024
1 parent 4c73341 commit b0c95a7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -std=c11")
endif()

include_directories(${PROJECT_BINARY_DIR}/src ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src/plugins_exts)
include_directories(${PROJECT_BINARY_DIR}/libyang ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src/plugins_exts)

# type plugins are separate because they have their documentation generated
set(type_plugins
Expand Down Expand Up @@ -205,16 +205,16 @@ set(internal_headers
src/xpath.h)

set(gen_headers
src/version.h
src/ly_config.h)
version.h
ly_config.h)

# files to generate doxygen from
set(doxy_files
doc/build.dox
doc/transition_1_2.dox
doc/transition_2_3.dox
${headers}
${PROJECT_BINARY_DIR}/src/version.h
${PROJECT_BINARY_DIR}/libyang/version.h
${type_plugins})

# project (doxygen) logo
Expand Down Expand Up @@ -322,8 +322,8 @@ if ("${BUILD_TYPE_UPPER}" STREQUAL "DEBUG")
endif()

# generate files
configure_file(${PROJECT_SOURCE_DIR}/src/ly_config.h.in ${PROJECT_BINARY_DIR}/src/ly_config.h @ONLY)
configure_file(${PROJECT_SOURCE_DIR}/src/version.h.in ${PROJECT_BINARY_DIR}/src/version.h @ONLY)
configure_file(${PROJECT_SOURCE_DIR}/src/ly_config.h.in ${PROJECT_BINARY_DIR}/libyang/ly_config.h @ONLY)
configure_file(${PROJECT_SOURCE_DIR}/src/version.h.in ${PROJECT_BINARY_DIR}/libyang/version.h @ONLY)

# DOC-only target with no extra dependencies
if("${BUILD_TYPE_UPPER}" STREQUAL "DOCONLY")
Expand Down Expand Up @@ -409,7 +409,7 @@ target_link_libraries(yang ${PCRE2_LIBRARIES})

# generated header list
foreach(h IN LISTS gen_headers)
list(APPEND g_headers ${PROJECT_BINARY_DIR}/${h})
list(APPEND g_headers ${PROJECT_BINARY_DIR}/libyang/${h})
endforeach()

# install the modules
Expand Down

0 comments on commit b0c95a7

Please sign in to comment.