diff --git a/CMakeLists.txt b/CMakeLists.txt index 71546875afc..4d1caa6db3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -269,6 +269,7 @@ serenity_component( ) if (HACKSTUDIO_BUILD) + include_directories(/usr/include/Userland/Services) include(${HACKSTUDIO_BUILD_CMAKE_FILE}) return() endif() diff --git a/Meta/CMake/code_generators.cmake b/Meta/CMake/code_generators.cmake index 21b293b8819..0baf6fd1171 100644 --- a/Meta/CMake/code_generators.cmake +++ b/Meta/CMake/code_generators.cmake @@ -33,6 +33,8 @@ function(compile_ipc source output) add_custom_target(generate_${output_name} DEPENDS ${output}) add_dependencies(all_generated generate_${output_name}) + # TODO: Use cmake_path() when we upgrade the minimum CMake version to 3.20 + # 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) diff --git a/Meta/CMake/utils.cmake b/Meta/CMake/utils.cmake index 6cddf3cb5ae..452333e27b5 100644 --- a/Meta/CMake/utils.cmake +++ b/Meta/CMake/utils.cmake @@ -11,6 +11,8 @@ function(serenity_install_headers target_name) endfunction() function(serenity_install_sources) + # TODO: Use cmake_path() when we upgrade the minimum CMake version to 3.20 + # 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) file(GLOB_RECURSE sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h" "*.cpp")