cmake_minimum_required(VERSION 2.6)
project(spmod_wiimotes)

set(spmod_wiimotes_SRCS
	${CUSTOM_INCLUDE_PATH}/mod_wiimotes/wiimotes_types.h
	wiimotes_types.cpp
	mod_wiimotes.cpp
	mod_wiimotes.h
	wwiimotesconfiguration.h
	wwiimotesconfiguration.cpp
	wwiimotesproperties.h
	wwiimotesproperties.cpp
)

add_library (spmod_wiimotes MODULE ${spmod_wiimotes_SRCS})
target_link_libraries(spmod_wiimotes wiiuse)
target_link_libraries(spmod_wiimotes spcore)
target_link_libraries(spmod_wiimotes ${Boost_THREAD_LIBRARY})
target_link_libraries(spmod_wiimotes ${wxWidgets_LIBRARIES})

IF(BUILD_TESTS)
	ADD_SUBDIRECTORY(tests)
ENDIF(BUILD_TESTS)

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