-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[feature] libusb-cmake as libusb provider and added support for MSVC #1440
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
[feature] libusb-cmake as libusb provider and added support for MSVC #1440
Conversation
- Changed Legacy MINGW Checkers for MSVC - If not available, now `Findlibusb.cmake` fetches `libusb-cmake` repo and includes it at config time - For MSVC, Added fix for ill-defined `ssize-t` - For linux build-along, added check whether LIBUDEV is installed/enabled
Nightwalker-87
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please solely introduce changes affecting the windows operating system due to the package-based nature of unix-based systems to ensure the verification of system integrity.
|
Tested the MSVC Build and it needs some additional root cmake modifications to work, but totally easy to do. Will come back with them sometime later today. As for the library part, This is something that cannot be brought to this PR, since it requres restructuring in both code and CMAKE:
|
Nightwalker-87
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I consider this a good and very useful contribution, with only a few remaining FMPOV accountable remarks that should be easily addressable. Thank you very much. 👍
|
@a-michelis: Sorry for the delay. Having swapped hardware recently, I needed some time last WE to finalise the setup of my working environment... |
@Nightwalker-87: I totally agree, It won't take much to add some compilation guidance to compiling.md. Small Context & suggestion: |
|
I'm sorry for being late on my promise, Holidays got the better of me! Added the compilation manual, as discussed! |
True, surely a good attempt. Maybe one may update and reuse the other Draft-PR for this. Thanks again for your valuable contribution @a-michelis. I believe we are now ready to merge. |
Overview
This pull request alters
Findlibusb.cmakein order to add proper Windows MSVC handling. It discards the old MINGW approach and uses thelibusb-cmakerepository as the main provider instead for both Windows and Linux. As it stands now, iflibusbis not installed for these two OSes, the libusb-cmake repository is being cloned and incorporated into the build. This way,stlinkhas a freshly builtlibusb, tailored to the system's configuration and needs, installed into the sameINSTALL_PREFIXasstlink.Additionally, this pull request adds Windows/MSVC support into the c/c++ github workflow.
Potential issues
In Windows, there is a possibility that the installation path for all
LIBRARYitems must be the same as the one ofRUNTIMEitems, as opposed to the Linux paradime, whereLIBRARYandARCHIVEitems are the ones that share location. This needs further investigation and potentialy a complementary fix, as I currently have no equipment and a clean environment to test it. I'll get back to it once I manage to prepare the proper testing ground.One very important note on this PR is that it probably drops support for MINGW. If mingw is still needed I'm going to need assistance, Since I've never worked with it in the past and i do not know how to properly validate such builds.
(Closes #1424)