I’m trying to build libshout for Android using cmake.
I do this in my high level CMakeLists.txt:
FetchContent_Declare(
ogg
GIT_REPOSITORY https://github.com/xiph/ogg.git
GIT_TAG v1.3.5
FIND_PACKAGE_ARGS
)
FetchContent_Declare(
vorbis
GIT_REPOSITORY https://github.com/xiph/vorbis.git
GIT_TAG v1.3.7
FIND_PACKAGE_ARGS
)
FetchContent_MakeAvailable(ogg)
FetchContent_MakeAvailable(vorbis)
add_subdirectory(third_party/shout)
I get this error
CMake Error at third_party/shout/CMakeLists.txt:41 (target_link_libraries):
Target "shout" links to:
Vorbis::vorbis
The line to which the above corresponds are
find_package(Vorbis REQUIRED)
target_link_libraries(shout PRIVATE Vorbis::vorbis Vorbis::vorbisenc Vorbis::vorbisfile)
so it seems that find_package works fine but the targets can not get found for some reason.
I’m new to CMake, could you guys point me out to what I’m doing wrong here?