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

libusb-cmake as libusb provider and added MSVC Support #1440

Open
wants to merge 5 commits into
base: testing
Choose a base branch
from

Conversation

a-michelis
Copy link

Overview

This pull request alters Findlibusb.cmake in order to add proper Windows MSVC handling. It discards the old MINGW approach and uses the libusb-cmake repository as the main provider instead for both Windows and Linux. As it stands now, if libusb is 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 same INSTALL_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 LIBRARY items must be the same as the one of RUNTIME items, as opposed to the Linux paradime, where LIBRARY and ARCHIVE 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.

- 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
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