From 5bebdc3b07058e3c8e3991e8335e23ac8f15b283 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Mon, 27 Aug 2012 12:58:44 -0400 Subject: [PATCH] Remove warning from cmake process --- IO/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IO/CMakeLists.txt b/IO/CMakeLists.txt index 38ac753..20aa058 100644 --- a/IO/CMakeLists.txt +++ b/IO/CMakeLists.txt @@ -11,7 +11,7 @@ SET( HEADERS FIND_PACKAGE( PNG ) IF( PNG_FOUND ) INCLUDE_DIRECTORIES( ${PNG_INCLUDE_DIR} ) - TARGET_LINK_LIBRARIES( ${PNG_LIBRARY} ) + SET( SOURCES ${SOURCES} "src/ImageLoaderPNG.cpp" ) SET( HEADERS ${HEADERS} "src/ImageLoaderPNG.h" ) @@ -29,3 +29,7 @@ ADD_LIBRARY(TexCompIO ${SOURCES} ${HEADERS} ) + +IF( PNG_FOUND ) + TARGET_LINK_LIBRARIES( TexCompIO ${PNG_LIBRARY} ) +ENDIF()