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-08-23 05:35:52 -04:00
|
|
|
set(SOURCE_FILES ${SOURCE_FILES} src/Win32KeyboardHook.cpp src/Win32KeyboardRawInput.cpp)
|
2019-10-25 19:51:40 -04:00
|
|
|
else()
|
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})
|
2020-08-09 09:03:52 -04:00
|
|
|
if (WIN32)
|
2020-08-21 07:37:10 -04:00
|
|
|
target_compile_definitions(${MODULE_NAME} PRIVATE -DUSING_UV_SHARED)
|
|
|
|
else()
|
|
|
|
target_compile_definitions(${MODULE_NAME} PRIVATE -DHAVE_X11)
|
2020-08-09 09:03:52 -04:00
|
|
|
endif()
|
|
|
|
|
2019-10-25 19:51:40 -04:00
|
|
|
add_executable(Hook-Test ${SOURCE_FILES} test/HookTest.cpp)
|
2020-08-09 09:03:52 -04:00
|
|
|
|
2019-10-25 19:51:40 -04:00
|
|
|
if(NOT MSVC)
|
|
|
|
target_link_libraries(${MODULE_NAME} X11)
|
|
|
|
target_link_libraries(Hook-Test X11 pthread)
|
|
|
|
endif()
|