2012-08-26 23:05:18 +00:00
|
|
|
|
|
|
|
SET( SOURCES
|
2012-10-20 22:22:29 +00:00
|
|
|
"src/ImageWriter.cpp"
|
2012-09-21 20:42:15 +00:00
|
|
|
"src/ImageLoader.cpp"
|
2012-10-20 22:22:29 +00:00
|
|
|
"src/ImageFile.cpp"
|
2012-08-26 23:05:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
SET( HEADERS
|
2012-10-20 22:22:29 +00:00
|
|
|
"config/ImageWriter.h.in"
|
2012-08-27 16:19:27 +00:00
|
|
|
"config/ImageLoader.h.in"
|
|
|
|
"include/ImageFile.h"
|
2012-10-03 23:58:33 +00:00
|
|
|
"include/FileStream.h"
|
2012-08-26 23:05:18 +00:00
|
|
|
)
|
|
|
|
|
2012-11-07 20:26:33 +00:00
|
|
|
IF( WIN32 )
|
|
|
|
SET( SOURCES ${SOURCES} "src/FileStreamWin32.cpp" )
|
|
|
|
ELSE()
|
|
|
|
SET( SOURCES ${SOURCES} "src/FileStreamUnix.cpp" )
|
|
|
|
|
|
|
|
# Assume compiler is GCC
|
|
|
|
SET( LINK_FLAGS -lrt ${LINK_FLAGS} )
|
|
|
|
ENDIF()
|
|
|
|
|
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-10-20 22:22:29 +00:00
|
|
|
SET( SOURCES ${SOURCES} "src/ImageWriterPNG.cpp" )
|
|
|
|
SET( HEADERS ${HEADERS} "src/ImageWriterPNG.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-10-20 22:22:29 +00:00
|
|
|
CONFIGURE_FILE(
|
|
|
|
"config/ImageWriter.h.in"
|
|
|
|
"include/ImageWriter.h"
|
|
|
|
)
|
|
|
|
|
2012-08-27 16:19:27 +00:00
|
|
|
INCLUDE_DIRECTORIES( ${TexC_BINARY_DIR}/IO/include )
|
|
|
|
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/IO/include )
|
2012-09-19 22:10:45 +00:00
|
|
|
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/Core/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-10-20 22:22:29 +00:00
|
|
|
TARGET_LINK_LIBRARIES( TexCompIO ${ZLIB_LIBRARY} )
|
2012-08-27 16:58:44 +00:00
|
|
|
ENDIF()
|