2012-08-27 01:05:18 +02:00
|
|
|
|
|
|
|
SET( SOURCES
|
2012-10-21 00:22:29 +02:00
|
|
|
"src/ImageWriter.cpp"
|
2012-09-21 22:42:15 +02:00
|
|
|
"src/ImageLoader.cpp"
|
2012-10-21 00:22:29 +02:00
|
|
|
"src/ImageFile.cpp"
|
2012-08-27 01:05:18 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
SET( HEADERS
|
2012-10-21 00:22:29 +02:00
|
|
|
"config/ImageWriter.h.in"
|
2012-08-27 18:19:27 +02:00
|
|
|
"config/ImageLoader.h.in"
|
|
|
|
"include/ImageFile.h"
|
2012-10-04 01:58:33 +02:00
|
|
|
"include/FileStream.h"
|
2012-08-27 01:05:18 +02:00
|
|
|
)
|
|
|
|
|
2012-11-07 21:26:33 +01: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 02:31:41 +02:00
|
|
|
FIND_PACKAGE( PNG )
|
|
|
|
IF( PNG_FOUND )
|
|
|
|
INCLUDE_DIRECTORIES( ${PNG_INCLUDE_DIR} )
|
2012-08-27 18:58:44 +02:00
|
|
|
|
2012-08-27 18:19:27 +02:00
|
|
|
SET( SOURCES ${SOURCES} "src/ImageLoaderPNG.cpp" )
|
|
|
|
SET( HEADERS ${HEADERS} "src/ImageLoaderPNG.h" )
|
2012-10-21 00:22:29 +02:00
|
|
|
SET( SOURCES ${SOURCES} "src/ImageWriterPNG.cpp" )
|
|
|
|
SET( HEADERS ${HEADERS} "src/ImageWriterPNG.h" )
|
2012-08-27 02:31:41 +02:00
|
|
|
ENDIF()
|
|
|
|
|
2012-08-27 01:51:49 +02:00
|
|
|
CONFIGURE_FILE(
|
2012-08-27 18:19:27 +02:00
|
|
|
"config/ImageLoader.h.in"
|
|
|
|
"include/ImageLoader.h"
|
2012-08-27 01:51:49 +02:00
|
|
|
)
|
|
|
|
|
2012-10-21 00:22:29 +02:00
|
|
|
CONFIGURE_FILE(
|
|
|
|
"config/ImageWriter.h.in"
|
|
|
|
"include/ImageWriter.h"
|
|
|
|
)
|
|
|
|
|
2012-08-27 18:19:27 +02:00
|
|
|
INCLUDE_DIRECTORIES( ${TexC_BINARY_DIR}/IO/include )
|
|
|
|
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/IO/include )
|
2012-09-20 00:10:45 +02:00
|
|
|
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/Core/include )
|
2012-08-27 01:51:49 +02:00
|
|
|
|
2012-08-27 01:05:18 +02:00
|
|
|
ADD_LIBRARY(TexCompIO
|
|
|
|
${SOURCES}
|
|
|
|
${HEADERS}
|
|
|
|
)
|
2012-08-27 18:58:44 +02:00
|
|
|
|
|
|
|
IF( PNG_FOUND )
|
|
|
|
TARGET_LINK_LIBRARIES( TexCompIO ${PNG_LIBRARY} )
|
2012-10-21 00:22:29 +02:00
|
|
|
TARGET_LINK_LIBRARIES( TexCompIO ${ZLIB_LIBRARY} )
|
2012-08-27 18:58:44 +02:00
|
|
|
ENDIF()
|