2012-08-26 23:05:18 +00:00
|
|
|
|
|
|
|
SET( SOURCES
|
2012-08-27 16:19:27 +00:00
|
|
|
"src/ImageFile.cpp"
|
2012-08-26 23:05:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
SET( HEADERS
|
2012-08-27 16:19:27 +00:00
|
|
|
"config/ImageLoader.h.in"
|
|
|
|
"include/ImageFile.h"
|
2012-08-26 23:05:18 +00:00
|
|
|
)
|
|
|
|
|
2012-08-27 00:31:41 +00:00
|
|
|
FIND_PACKAGE( PNG )
|
|
|
|
IF( PNG_FOUND )
|
|
|
|
INCLUDE_DIRECTORIES( ${PNG_INCLUDE_DIR} )
|
2012-08-27 16:58:44 +00:00
|
|
|
|
2012-08-27 16:19:27 +00:00
|
|
|
SET( SOURCES ${SOURCES} "src/ImageLoaderPNG.cpp" )
|
|
|
|
SET( HEADERS ${HEADERS} "src/ImageLoaderPNG.h" )
|
2012-08-27 00:31:41 +00:00
|
|
|
ENDIF()
|
|
|
|
|
2012-08-26 23:51:49 +00:00
|
|
|
CONFIGURE_FILE(
|
2012-08-27 16:19:27 +00:00
|
|
|
"config/ImageLoader.h.in"
|
|
|
|
"include/ImageLoader.h"
|
2012-08-26 23:51:49 +00:00
|
|
|
)
|
|
|
|
|
2012-08-27 16:19:27 +00:00
|
|
|
INCLUDE_DIRECTORIES( ${TexC_BINARY_DIR}/IO/include )
|
|
|
|
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/IO/include )
|
2012-08-26 23:51:49 +00:00
|
|
|
|
2012-08-26 23:05:18 +00:00
|
|
|
ADD_LIBRARY(TexCompIO
|
|
|
|
${SOURCES}
|
|
|
|
${HEADERS}
|
|
|
|
)
|
2012-08-27 16:58:44 +00:00
|
|
|
|
|
|
|
IF( PNG_FOUND )
|
|
|
|
TARGET_LINK_LIBRARIES( TexCompIO ${PNG_LIBRARY} )
|
2012-08-28 20:45:37 +00:00
|
|
|
TARGET_LINK_LIBRARIES( TexCompIO ${ZLIB_LIBRARY} )
|
2012-08-27 16:58:44 +00:00
|
|
|
ENDIF()
|