PROJECT(k3dsdk-parallel)

FILE(GLOB HEADERS *.h)
FILE(GLOB SOURCES *.cpp)

LIST(SORT HEADERS)
LIST(SORT SOURCES)

K3D_ADD_LIBRARY(k3dsdk-parallel SHARED ${HEADERS} ${SOURCES})
K3D_GENERATE_DEF_FILE(k3dsdk-parallel)

IF(K3D_ENABLE_PARALLEL)
	INCLUDE_DIRECTORIES(${K3D_TBB_INCLUDE_DIR})
	TARGET_LINK_LIBRARIES(k3dsdk-parallel ${K3D_TBB_LIBRARY})
ENDIF(K3D_ENABLE_PARALLEL)

INSTALL(TARGETS k3dsdk-parallel
	RUNTIME DESTINATION bin
	LIBRARY DESTINATION ${K3D_LIBDIR}
	ARCHIVE DESTINATION ${K3D_LIBDIR})
INSTALL(FILES ${HEADERS} DESTINATION include/k3d/k3dsdk/parallel)

