diff --git a/cmake/FindIgnOGRE.cmake b/cmake/FindIgnOGRE.cmake index b86c66ba..3c7b9e18 100644 --- a/cmake/FindIgnOGRE.cmake +++ b/cmake/FindIgnOGRE.cmake @@ -178,7 +178,7 @@ else() set(prefix "") # vcpkg uses special directory (lib/manual-link/) to place libraries # with main sysmbol like OgreMain. - if(ogre_lib MATCHES "OgreMain" AND NOT IS_ABSOLUTE "${ogre_lib}") + if(ogre_lib MATCHES "OgreMain" AND NOT IS_ABSOLUTE "${ogre_lib}" AND EXISTS "${OGRE_LIBRARY_DIRS}/manual-link/") set(prefix "${OGRE_LIBRARY_DIRS}/manual-link/") elseif(ogre_lib MATCHES "Ogre" AND NOT IS_ABSOLUTE "${ogre_lib}") set(prefix "${OGRE_LIBRARY_DIRS}/")