if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
	add_executable(cpustat cpustat.c)
	install(TARGETS cpustat DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

add_executable(imgdiff imgdiff.c)
target_link_libraries(imgdiff vglutil)
if(UNIX)
	target_link_libraries(imgdiff m)
endif()

if(MINGW)
	add_definitions(-DWINVER=0x0600)
endif()
if(WIN32)
	add_executable(tcbench tcbench.cpp)
else()
	include_directories(${X11_XTest_INCLUDE_PATH})
	add_executable(tcbench tcbench.cpp dsimple.c)
	target_link_libraries(tcbench ${X11_XTest_LIB})
endif()
target_link_libraries(tcbench fbx)
install(TARGETS tcbench DESTINATION ${CMAKE_INSTALL_BINDIR})
