FasTC/IO/CMakeLists.txt

49 lines
997 B
CMake
Raw Normal View History

SET( SOURCES
2012-10-20 22:22:29 +00:00
"src/ImageWriter.cpp"
"src/ImageLoader.cpp"
"src/FileStream.cpp"
2012-10-20 22:22:29 +00:00
"src/ImageFile.cpp"
)
SET( HEADERS
2012-10-20 22:22:29 +00:00
"config/ImageWriter.h.in"
"config/ImageLoader.h.in"
"include/ImageFile.h"
"include/FileStream.h"
)
FIND_PACKAGE( PNG )
IF( PNG_FOUND )
INCLUDE_DIRECTORIES( ${PNG_INCLUDE_DIR} )
2012-08-27 16:58:44 +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" )
ENDIF()
CONFIGURE_FILE(
"config/ImageLoader.h.in"
"include/ImageLoader.h"
)
2012-10-20 22:22:29 +00:00
CONFIGURE_FILE(
"config/ImageWriter.h.in"
"include/ImageWriter.h"
)
INCLUDE_DIRECTORIES( ${TexC_BINARY_DIR}/IO/include )
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/IO/include )
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/Core/include )
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()