-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
System OpenEXR detection broken in Linux #16293
Copy link
Copy link
Closed
Description
After committing 2e20f06 system OpenEXR library detection is broken in Linux.
First:
SET(LIBRARY_SUFFIXES
"-${OPENEXR_VERSION}"
"-${OPENEXR_VERSION}_s"
"-${OPENEXR_VERSION}_d"
"-${OPEXEXR_VERSION}_s_d"
""
"_s"
"_d"
"_s_d")
FOREACH(LIBRARY_SUFFIX ${LIBRARY_SUFFIXES})
ignores empty suffix ("") while iterating in FOREACH loop. On Ubuntu 18.04 default libraries installed from apt-get do not have any suffixes.
Second:
In function
MACRO(FIND_OPENEXR_LIBRARY LIBRARY_NAME LIBRARY_SUFFIX)
string(TOUPPER "${LIBRARY_NAME}" LIBRARY_NAME_UPPER)
FIND_LIBRARY(OPENEXR_${LIBRARY_NAME_UPPER}_LIBRARY
NAMES ${LIBRARY_NAME}${LIBRARY_SUFFIX}
PATH_SUFFIXES ${OPENEXR_LIBSEARCH_SUFFIXES}
NO_DEFAULT_PATH
PATHS "${SEARCH_PATH}/lib" "${SEARCH_PATH}/lib/static")
ENDMACRO()
NO_DEFAULT_PATH is passed, so libraries are not searched in default Linux directories like x86_64-linux-gnu or i386-linux-gnu. Though it can be fixed by providing search path suffixes as for Windows build.
System information (version)
- OpenCV => 4.2.0
- Operating System / Platform => Ubuntu 18.04
- Compiler => gcc 7.4.0
I will do PR with fixes
Reactions are currently unavailable