FasTC/IO/CMakeLists.txt

57 lines
1.1 KiB
CMake
Raw Normal View History

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