pololu / libusbp

The Pololu USB Library (also known as libusbp) is a cross-platform C library for accessing USB devices.
Other
104 stars 32 forks source link

Project can't be included as a sub-project of another CMake project #15

Open mschuckmann opened 1 year ago

mschuckmann commented 1 year ago

Attempting to use CMakes fetchcontent() facility or simply including this project as a sub-project (or dependency) of another CMake project fails due to incorrect use of CMAKE_SOURCE_DIR in when setting up the include paths in src/CMakeLists.txt

The use of CMAKE_SOURCE_DIR should be replaced with CMAKE_PROJECT_SOURCE_DIR. Additionally the use of CMAKE_CURRENT_*_DIR variables should probably be changed to use the CMAKE_PROJECT_*_DIR versions.

There maybe other similar changes required.