chmod222 / libcmmk

An unofficial LED control API for Coolermaster Masterkey keyboards
GNU Lesser General Public License v3.0
100 stars 24 forks source link

Building on Windows? #18

Open sam97 opened 4 years ago

sam97 commented 4 years ago

Hi. I'm trying to build libcmmk on Windows under MinGW, but I'm having a hard time linking the libusb-1.0.a library via CMake. I'm not too well-versed with CMake so I'm unable to come up with a good solution to this. Anyone has experience building this via CMake?

I've successfully built it with Visual Studio, but I'm getting a LIBUSB_ERROR_NOT_FOUND so I thought maybe I'll try compiling without C++ involved (MSVC doesn't support C99 fully). If the issue persists with the MinGW build too, then I can look forward to other solutions (I hear libusb doesn't work well with HID devices?).

For the record, I'm getting a undefined reference to libsub*_ error. I've tried using commands like link_libraries, find_library, target_link_libraries, etc. but I usually end up with -llibusb-1.0 not found errors. If someone can help me fix it that'll be very helpful.

@chmod222 have you tried building on Windows? The build instructions I assume are for Linux, so if you have build instructions for Windows too that'd be great.