Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrections to create relocatable CMake package (for linux and windows) #652

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

kutij
Copy link

@kutij kutij commented Oct 17, 2022

Now by calling CMake install, a relocatable CMake package can be created, that

  • can contain Release/Debug/MinSizeRel/RelWithDebInfo versions as well, and will be linked appropriately
  • can be used via simple find_package (will link the system libraries automatically, copy the additional libraries from the SOEM e.g. WinPCap, these libraries are copied into the package as well)

The generated package can be simply used by calling "find_package(soem)" & "target_link_libraries(projectname soem)"...

The modifications are perfomed for the case of Windows and Linux. Tested on Windows 10 and Ubuntu 22.04.

.gitignore update for the sake of CLion environment
Now variable OS_LIBS contains the system libraries too and the wpcap/packet libs with correct build/install pathes (SoemConfig will inherit it)
All of the requested libraries are listed in variable OS_INCLUDE (both the build and install pathes).

The headers in question are copied into the package.
…an be in the package via postfixes

For windows, the VS toolset & platform is  also described (the config will link the appropriately one)
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.

None yet

1 participant