2012-08-27 17:36:59 +00:00
|
|
|
|
|
|
|
SET( SOURCES
|
|
|
|
"src/TexComp.cpp"
|
2012-08-27 22:34:37 +00:00
|
|
|
"src/CompressedImage.cpp"
|
2012-09-21 20:42:15 +00:00
|
|
|
"src/Image.cpp"
|
2012-08-27 17:36:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
SET( HEADERS
|
|
|
|
"include/TexComp.h"
|
2012-08-27 22:34:37 +00:00
|
|
|
"include/CompressedImage.h"
|
2012-08-30 18:00:18 +00:00
|
|
|
"include/TexCompTypes.h"
|
2012-09-21 20:42:15 +00:00
|
|
|
"include/Image.h"
|
2012-08-27 17:36:59 +00:00
|
|
|
)
|
|
|
|
|
2012-08-30 18:00:18 +00:00
|
|
|
# Make sure to add the appropriate stopwatch files...
|
|
|
|
SET( HEADERS ${HEADERS} "src/StopWatch.h" )
|
2012-08-30 20:56:42 +00:00
|
|
|
|
|
|
|
IF( WIN32 )
|
2012-08-30 18:00:18 +00:00
|
|
|
SET( SOURCES ${SOURCES} "src/StopWatchWin32.cpp" )
|
2012-08-30 20:56:42 +00:00
|
|
|
ELSEIF( APPLE )
|
|
|
|
SET( SOURCES ${SOURCES} "src/StopWatchOSX.cpp" )
|
2012-08-30 18:00:18 +00:00
|
|
|
ELSE()
|
|
|
|
SET( SOURCES ${SOURCES} "src/StopWatchUnix.cpp" )
|
2012-08-30 21:13:36 +00:00
|
|
|
|
|
|
|
# Assume compiler is GCC
|
|
|
|
SET( LINK_FLAGS -lrt ${LINK_FLAGS} )
|
2012-08-30 18:00:18 +00:00
|
|
|
ENDIF()
|
|
|
|
|
2012-08-28 23:42:28 +00:00
|
|
|
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/BPTCEncoder/include )
|
|
|
|
INCLUDE_DIRECTORIES( ${TexC_BINARY_DIR}/BPTCEncoder/include )
|
|
|
|
|
2012-08-27 22:34:37 +00:00
|
|
|
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/IO/include )
|
2012-08-28 23:42:28 +00:00
|
|
|
INCLUDE_DIRECTORIES( ${TexC_BINARY_DIR}/IO/include )
|
|
|
|
|
2012-08-27 17:36:59 +00:00
|
|
|
INCLUDE_DIRECTORIES( ${TexC_SOURCE_DIR}/Core/include )
|
|
|
|
|
2012-08-29 18:43:37 +00:00
|
|
|
FIND_PACKAGE( Boost COMPONENTS thread system )
|
|
|
|
IF( Boost_FOUND )
|
|
|
|
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
|
|
|
|
|
2012-09-21 20:57:45 +00:00
|
|
|
SET( SOURCES ${SOURCES} "src/ThreadGroup.cpp" )
|
|
|
|
SET( SOURCES ${SOURCES} "src/WorkerQueue.cpp" )
|
|
|
|
|
|
|
|
SET( HEADERS ${HEADERS} "src/ThreadGroup.h" )
|
|
|
|
SET( HEADERS ${HEADERS} "src/WorkerQueue.h" )
|
2012-08-29 18:43:37 +00:00
|
|
|
|
|
|
|
LINK_DIRECTORIES( ${Boost_LIBRARY_DIR} )
|
|
|
|
ENDIF()
|
|
|
|
|
2012-08-27 17:36:59 +00:00
|
|
|
ADD_LIBRARY( TexCompCore
|
|
|
|
${HEADERS}
|
|
|
|
${SOURCES}
|
|
|
|
)
|
2012-08-27 22:34:37 +00:00
|
|
|
|
|
|
|
TARGET_LINK_LIBRARIES( TexCompCore TexCompIO )
|
2012-08-28 23:42:28 +00:00
|
|
|
TARGET_LINK_LIBRARIES( TexCompCore BPTCEncoder )
|
2012-08-29 18:43:37 +00:00
|
|
|
|
|
|
|
IF( Boost_FOUND )
|
|
|
|
TARGET_LINK_LIBRARIES( TexCompCore ${Boost_LIBRARIES} )
|
|
|
|
ENDIF()
|
2012-08-30 21:13:36 +00:00
|
|
|
|
|
|
|
IF( NOT WIN32 AND NOT APPLE )
|
|
|
|
TARGET_LINK_LIBRARIES( TexCompCore rt )
|
|
|
|
ENDIF()
|