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()