Skip to content

Conversation

jan-ati
Copy link
Collaborator

@jan-ati jan-ati commented Sep 25, 2024

Modified the include paths for the EIPScanner so that all nested paths are explicit. This removes potential confusion with linking as only the /usr/local/include/ directory needs to be referenced by a cmake project using the EIPScanner.

Also updated the Examples to use the EIPScanner library rather than relative paths to the <PROJECT_DIR>/src directory. That is slighly hacky as a separate cmake process is run. This is required as the EIPScanner library needs to be installed before the examples can be built.

@jan-ati jan-ati requested a review from jbcpollak September 25, 2024 14:17
Comment on lines +17 to +21
add_subdirectory(cip)
add_subdirectory(eip)
add_subdirectory(fileObject)
add_subdirectory(sockets)
add_subdirectory(utils)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Add a CMakeLists.txt file to every sub_directory to clean up pathing.

Each subdirectory is build independently and then linked back to the parent library

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

** Added a source to the parent library.

I found a great source by a maintainer of CMake and updated all of the CMakeLists.txt files to use the target_sources() function.

https://crascit.com/2016/01/31/enhanced-source-file-handling-with-target_sources/

@jan-ati
Copy link
Collaborator Author

jan-ati commented Sep 25, 2024

NOTE: The unit tests still are not building as expected.

This is something that should still be fixed. Afterwards, this branch can be merged back into the forked source

@jan-ati jan-ati changed the title En 426 fix eip scanner include paths Draft: En 426 fix eip scanner include paths Sep 25, 2024
@jan-ati jan-ati merged commit b6f4faf into main Oct 2, 2024
@jan-ati jan-ati deleted the EN-426-fix-EIPScanner-include-paths branch October 2, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant