Parcourir la source

CMake: Silence PNG not found error

Hopefully this will make people stop thinking it's a hard dependency.
Yuri Kunde Schlesner il y a 11 ans
Parent
commit
361735e7fe
1 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 4 2
      CMakeLists.txt

+ 4 - 2
CMakeLists.txt

@@ -33,10 +33,12 @@ else()
 endif()
 add_definitions(-DSINGLETHREADED)
 
-find_package(PNG)
+find_package(PNG QUIET)
 if (PNG_FOUND)
     add_definitions(-DHAVE_PNG)
-endif ()
+else()
+    message(STATUS "libpng not found. Some debugging features have been disabled.")
+endif()
 
 find_package(Boost)
 if (Boost_FOUND)