-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
libusb-cmake as libusb provider and added MSVC Support #1440
base: testing
Are you sure you want to change the base?
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
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:
|
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: |
Overview
This pull request alters
Findlibusb.cmake
in order to add proper Windows MSVC handling. It discards the old MINGW approach and uses thelibusb-cmake
repository as the main provider instead for both Windows and Linux. As it stands now, iflibusb
is not installed for these two OSes, the libusb-cmake repository is being cloned and incorporated into the build. This way,stlink
has a freshly builtlibusb
, tailored to the system's configuration and needs, installed into the sameINSTALL_PREFIX
asstlink
.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
LIBRARY
items must be the same as the one ofRUNTIME
items, as opposed to the Linux paradime, whereLIBRARY
andARCHIVE
items 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)