I find the library with the find_library function
find_library
find_library(MY_LIB lib PATHS ${MY_PATH})
If the library is found, ${MY_
${MY_
Simply do
if(MY_LIB) #found ... else() #not found ... endif()