2019-10-25 19:51:40 -04:00
|
|
|
set(MODULE_NAME "teaclient_ppt")
|
|
|
|
|
2019-11-03 11:01:21 -05:00
|
|
|
set(SOURCE_FILES src/KeyboardHook.cpp)
|
2019-10-25 19:51:40 -04:00
|
|
|
if (MSVC)
|
2020-05-01 11:37:18 -04:00
|
|
|
set(SOURCE_FILES ${SOURCE_FILES} src/Win32KeyboardHook.cpp src/Win32KeyboardHookLL.cpp src/Win32KeyboardRawInput.cpp)
|
2019-10-25 19:51:40 -04:00
|
|
|
add_definitions(-DUSING_UV_SHARED)
|
|
|
|
else()
|
|
|
|
add_definitions(-DHAVE_X11)
|
2019-11-03 11:01:21 -05:00
|
|
|
set(SOURCE_FILES ${SOURCE_FILES} src/X11KeyboardHook.cpp)
|
2019-10-25 19:51:40 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
add_nodejs_module(${MODULE_NAME} binding.cc ${SOURCE_FILES})
|
|
|
|
add_executable(Hook-Test ${SOURCE_FILES} test/HookTest.cpp)
|
|
|
|
if(NOT MSVC)
|
|
|
|
target_link_libraries(${MODULE_NAME} X11)
|
|
|
|
target_link_libraries(Hook-Test X11 pthread)
|
|
|
|
endif()
|