cmake_minimum_required(VERSION 2.6)
project(spmod_hid)

set(spmod_hid_SRCS	
	mod_hid.cpp
	mousecontrol.h
	mousecontrol.cpp
)

add_library (spmod_hid MODULE ${spmod_hid_SRCS})
target_link_libraries(spmod_hid spcore)
#target_link_libraries(spmod_hid ${Boost_THREAD_LIBRARY})

#
# X11
#

if(NOT WIN32)
	find_package(X11 REQUIRED)
	if (NOT X11_XTest_FOUND)
		message (FATAL_ERROR "X11_XTest extensions not found.")
	endif(NOT X11_XTest_FOUND)
	include_directories(${X11_INCLUDE_DIR})
	target_link_libraries(spmod_hid ${X11_X11_LIB})
	target_link_libraries(spmod_hid ${X11_XTest_LIB})
endif(NOT WIN32)

INSTALL (TARGETS spmod_hid RUNTIME DESTINATION ${LIBRUNTIMEDIR} LIBRARY DESTINATION ${PLUGINDIR})