Fix check that given IRRLICHT_LIBRARY exists

master
sfan5 2021-06-05 13:36:52 +02:00
parent 40acfc938c
commit 46f42e15c4
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ if(IRRLICHT_INCLUDE_DIR AND (NOT IS_DIRECTORY "${IRRLICHT_INCLUDE_DIR}" OR
endif()
if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR APPLE)
# (only on systems where we're sure how a valid library looks like)
if(IRRLICHT_LIBRARY AND (IS_DIRECTORY "${IRRLICHT_LIBRARY}" OR
if(IRRLICHT_LIBRARY AND (NOT EXISTS "${IRRLICHT_LIBRARY}" OR
NOT IRRLICHT_LIBRARY MATCHES "\\.(a|so|dylib|lib)([.0-9]+)?$"))
message(WARNING "IRRLICHT_LIBRARY was set to ${IRRLICHT_LIBRARY} "
"but is not a valid library file. The path will not be used.")