1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +00:00

Meta: Use CMAKE_INSTALL_FOODIR variables instead of hardcoding usr/foo

In preparation for future refactoring of Lagom, let's use the variables
from GNUInstallDirs as much as possible for the helper macros and other
scripts used by the main build already.
This commit is contained in:
Andrew Kaster 2022-07-04 11:01:05 -06:00 committed by Andreas Kling
parent 2b82c83ceb
commit 02e8f29560
3 changed files with 12 additions and 10 deletions

View file

@ -37,7 +37,7 @@ function(compile_ipc source output)
# https://cmake.org/cmake/help/v3.23/command/cmake_path.html#relative-path
string(LENGTH ${SerenityOS_SOURCE_DIR} root_source_dir_length)
string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${root_source_dir_length} -1 current_source_dir_relative)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION usr/include${current_source_dir_relative} OPTIONAL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${current_source_dir_relative}" OPTIONAL)
endfunction()
function(generate_state_machine source header)