Skip to content

[Bug] Fix file path issues in multiple CMake files#71

Merged
QuangHaiNguyen merged 1 commit into
mainfrom
release/v1.0.1
Feb 22, 2026
Merged

[Bug] Fix file path issues in multiple CMake files#71
QuangHaiNguyen merged 1 commit into
mainfrom
release/v1.0.1

Conversation

@QuangHaiNguyen
Copy link
Copy Markdown
Collaborator

Summary

This pull request fixes the compile error "missing header files" when integrating the ramework to a project.

Related Issues

Changes

  • N/A

Screenshots / Demo (if applicable)

  • N/A

Checklist

  • Code follows project style guidelines
  • Code is compiled without issues
  • Documentation updated if needed
  • [ ] Tests added/updated and passing

@QuangHaiNguyen QuangHaiNguyen self-assigned this Feb 22, 2026
@QuangHaiNguyen QuangHaiNguyen added the bug Something isn't working label Feb 22, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes compile errors related to missing header files when integrating the framework as a subdirectory into another CMake project. The issue occurred because the framework was using CMAKE_SOURCE_DIR, which points to the top-level project's source directory rather than the framework's own root when used as a subdirectory. The fix replaces CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR combined with relative paths to correctly locate the framework's root directory regardless of how it's integrated.

Changes:

  • Updated FRAMEWORK_ROOT_DIR definitions to use CMAKE_CURRENT_SOURCE_DIR with relative paths (../.., ../../.., etc.)
  • Replaced CMAKE_SOURCE_DIR references with FRAMEWORK_ROOT_DIR in include directory specifications
  • Updated root CMakeLists.txt configure_file() to use relative paths for better portability

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/utilities/CMakeLists.txt Updated FRAMEWORK_ROOT_DIR definition and replaced CMAKE_SOURCE_DIR with FRAMEWORK_ROOT_DIR in all include directories
src/service/task_worker/CMakeLists.txt Updated FRAMEWORK_ROOT_DIR definition and include directory path
src/service/state_machine/CMakeLists.txt Updated FRAMEWORK_ROOT_DIR definition and include directory path
src/service/rpc/CMakeLists.txt Updated FRAMEWORK_ROOT_DIR definition and include directory path
src/service/ipc/CMakeLists.txt Updated FRAMEWORK_ROOT_DIR definition and include directory path
src/service/event_bus/CMakeLists.txt Added FRAMEWORK_ROOT_DIR definition and updated include directory path
src/service/data_model/CMakeLists.txt Fixed incorrect "ezmsdk" path reference and updated to use FRAMEWORK_ROOT_DIR
src/service/cli/CMakeLists.txt Updated FRAMEWORK_ROOT_DIR definition and include directory path
src/service/CMakeLists.txt Updated FRAMEWORK_ROOT_DIR definition to use relative paths
src/middlewares/osal/CMakeLists.txt Updated FRAMEWORK_ROOT_DIR definition and include directory path
src/middlewares/CMakeLists.txt Removed unused FRAMEWORK_ROOT_DIR definition
src/hal/CMakeLists.txt Updated FRAMEWORK_ROOT_DIR definition, include directory paths, and simplified target_link_libraries
CMakeLists.txt Updated configure_file to use relative paths instead of CMAKE_SOURCE_DIR

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/utilities/CMakeLists.txt Outdated
Comment on lines 47 to 49
message(STATUS "Hereeeeeeeeeeeeeee")
message(STATUS ${FRAMEWORK_ROOT_DIR})

Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug messages should be removed before merging. These appear to be temporary debugging statements that were accidentally left in the code.

Suggested change
message(STATUS "Hereeeeeeeeeeeeeee")
message(STATUS ${FRAMEWORK_ROOT_DIR})

Copilot uses AI. Check for mistakes.
Comment thread src/hal/CMakeLists.txt
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@QuangHaiNguyen QuangHaiNguyen merged commit 0e99513 into main Feb 22, 2026
2 checks passed
@QuangHaiNguyen QuangHaiNguyen deleted the release/v1.0.1 branch February 22, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] header files path are wrong when integrate framework to a CMake project

2 participants