conda-forge / libvorbis-feedstock

A conda-smithy repository for libvorbis.
BSD 3-Clause "New" or "Revised" License
2 stars 8 forks source link

Missing item in VORBIS LIBRARY on Windows #9

Closed martinRenou closed 4 years ago

martinRenou commented 4 years ago

When trying to use livvorbis in a CMake project on Windows I get the following error:

-- Found VORBIS: VORBISENC_LIBRARY-NOTFOUND;VORBISFILE_LIBRARY-NOTFOUND;VORBIS_LIBRARY-NOTFOUND;C:/bld/sfml_1581665442026/_h_env/Library/lib/ogg.lib  
CMake Error at cmake/Macros.cmake:296 (message):
  Missing item in VORBIS_LIBRARIES
Call Stack (most recent call first):
  src/SFML/Audio/CMakeLists.txt:70 (sfml_find_package)
-- Configuring incomplete, errors occurred!

The full stack is visible here: https://ci.appveyor.com/project/conda-forge/staged-recipes/builds/30796398

martinRenou commented 4 years ago

I guess the important part is:

VORBISENC_LIBRARY-NOTFOUND
VORBISFILE_LIBRARY-NOTFOUND
VORBIS_LIBRARY-NOTFOUND

Could it be that this recipe for libvorbis does not install everything?

martinRenou commented 4 years ago

I think I understand what the problem is. A custom CMakeLists file is used in this recipe. But there it does not export the same VORBISENC_LIBRARY VORBISFILE_LIBRARY and VORBIS_LIBRARY like the official CMakeLists file is doing: https://github.com/xiph/vorbis/blob/master/CMakeLists.txt

dschreij commented 4 years ago

Back at the time, I created the CMakeLists.txt file from scratch and proposed the developer of libvorbis to adopt it and maintain it. He already had several build systems in place back then, and didn't feel like adding CMake too. This apparently has changed since then, so I'm happy there is an official CMake file now. I just merged a PR that uses this file, so I hope that also solves this problem.

martinRenou commented 4 years ago

Thanks @dschreij, it looks like it works on Windows now. So I guess it's safe to close this issue.

I get a very similar issue on libflac https://github.com/conda-forge/libflac-feedstock/issues/7 which I see you are a maintainer. I guess you used the same approach. I am happy to take a look at it and try to fix it.