Fix Png dependency in examples build (fixes screenshot ability in glViewer)

This commit is contained in:
manuelk 2014-12-18 11:13:28 -08:00
parent 4b6db70539
commit 4643a51fb0

View File

@ -22,21 +22,19 @@
# language governing permissions and limitations under the Apache License.
#
# optional dependency - enables screenshots in some examples
find_package(PNG)
if (PNG_FOUND)
include_directories("${PNG_INCLUDE_DIRS}")
list(APPEND PLATFORM_LIBRARIES "${PNG_LIBRARIES}")
add_definitions(-DOPENSUBDIV_HAS_PNG)
endif()
add_subdirectory(common)
if (NOT NO_OPENGL)
if (OPENGL_FOUND AND (GLEW_FOUND AND GLFW_FOUND) OR (APPLE AND GLFW_FOUND))
# optional dependency - enables screenshots in some examples
find_package(PNG)
if (PNG_FOUND)
include_directories("${PNG_INCLUDE_DIRS}")
list(APPEND PLATFORM_LIBRARIES "${PNG_LIBRARIES}")
add_definitions(-DOPENSUBDIV_HAS_PNG)
endif()
add_subdirectory(glViewer)
add_subdirectory(glEvalLimit)
add_subdirectory(glShareTopology)