Meta: Guard everything that installs headers with an option

This commit is contained in:
Tim Schumacher 2024-07-20 19:03:24 +02:00 committed by Andrew Kaster
commit cf6929fef3
Notes: github-actions[bot] 2024-07-25 19:26:05 +00:00
8 changed files with 83 additions and 59 deletions

View file

@ -41,6 +41,8 @@ function(compile_ipc source output)
add_dependencies(all_generated generate_${output_name})
cmake_path(RELATIVE_PATH CMAKE_CURRENT_SOURCE_DIR BASE_DIRECTORY ${SerenityOS_SOURCE_DIR} OUTPUT_VARIABLE current_source_dir_relative)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${current_source_dir_relative}" OPTIONAL)
if (ENABLE_INSTALL_HEADERS)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${current_source_dir_relative}" OPTIONAL)
endif()
endfunction()