Я делаю это в своем 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)
Код: Выделить всё
CMake Error at third_party/shout/CMakeLists.txt:41 (target_link_libraries):
Target "shout" links to:
Vorbis::vorbis
Код: Выделить всё
find_package(Vorbis REQUIRED)
target_link_libraries(shout PRIVATE Vorbis::vorbis Vorbis::vorbisenc Vorbis::vorbisfile)
Я новичок в CMake, не могли бы вы указать мне на то, что я я здесь делаю что-то не так?
Подробнее здесь: https://stackoverflow.com/questions/786 ... sing-cmake