Answer the question
In order to leave comments, you need to log in
Why doesn't find_library() want to search inside CMAKE_LIBRARY_PATH?
It searches with the full path, but not so (see below).
set(CMAKE_LIBRARY_PATH C:/Users/me/Desktop/)
find_library(av_codec
NAMES
avcodec
HINTS
ffmpeg-4.3-win64-dev/lib
REQUIRED
)
message(${av_codec})
Semicolon-separated list of directories specifying a search path for the find_library() command
REQUIRED
does not break the configuration, despite the fact that av_codec-NOTFOUND
(through message()
). Are these CMake bugs or what?
Answer the question
In order to leave comments, you need to log in
I figured it out, there is for this PATH_SUFFIXES
, but PATHS
/ HINTS
does not work like that ( paths are not concatenated ):
set(CMAKE_LIBRARY_PATH C:/Users/march/Desktop/)
find_library(av_codec
NAMES
avcodec
PATH_SUFFIXES
ffmpeg-4.3-win64-dev/lib/
REQUIRED
)
message(${av_codec})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question