Open asmaloney opened 1 year ago
As a workaround I copied the FindLibUUID.cmake from CMake, changed the case to FindLibuuid (including vars), included it in my repo, and added it to CMAKE_MODULE_PATH
.
Not ideal, but it works.
If anyone know the "right" way to find/include FindLibuuid, please let me know!
I found a solution:
sudo apt-get install uuid-dev
Then you can simply link the library by name uuid
and the include path is usr/include/uuid/
.
Then you can simply link the library by name
uuid
and the include path isusr/include/uuid/
.
Can you please provide the code snippet? Thanks
Then you can simply link the library by name uuid and the include path is usr/include/uuid/.
This isn't actually fixing the problem - it's just removing FindLibuuid
and hardcoding paths.
Then you can simply link the library by name uuid and the include path is usr/include/uuid/.
This isn't actually fixing the problem - it's just removing
FindLibuuid
and hardcoding paths.
Well, I totally agree. It's not a proper solution. Maybe I should detect which Linux distribution it runs on.
The solution I found to fix this problem is adding the following line before including stduuid in CMake:
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/lib/stduuid/cmake")
After adding this line, stduuid was able to find the library just fine. I suspect Config.cmake.in
isn't being executed in some configurations of using this library with CMake.
Am running into this issue with Debian too, FWIW. I'm not too familiar with the inner-workings of this project so I would feel uncomfortable submitting a PR for the CMake fix, but I believe just adding the modules to the module path will make FindLibuuid.cmake
execute again.
Thanks @frank2. That works. The included FindLibuuid.cmake
seems a lot less robust than the one included with CMake. It does mean one less file to include in my lib though. 🤷
I'm replacing an older UUID lib with stduuid.
The old one used FindLibUUID in its cmake files and it worked fine on Debian with cmake and uuid-dev installed (GitLab CI).
When I switched my stuff to stduuid, it is using FindLibuuid (lowercase uuid) and now my CI fails:
Looking at CMake, they include FindLibUUID as a module which is what I assume was being found before.
Is there another package I need to install on Debian to get FindLibuuid to work?