mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[host/common] windows: provide delayExecution
via nsleep
This change moves this platform specific sleep to `common` as the OS agnostic `nsleep` function. Ref PR #661
This commit is contained in:
@@ -10,7 +10,6 @@ add_library(platform_Windows STATIC
|
||||
src/service.c
|
||||
src/mousehook.c
|
||||
src/force_compose.c
|
||||
src/delay.c
|
||||
)
|
||||
|
||||
# allow use of functions for Windows 7 or later
|
||||
@@ -18,31 +17,11 @@ add_compile_definitions(WINVER=0x0601 _WIN32_WINNT=0x0601)
|
||||
|
||||
add_subdirectory("capture")
|
||||
|
||||
if (MINGW)
|
||||
# Build our own ntdll.dll import library
|
||||
# This tricks MinGW into not linking stuff like memcpy from ntdll.dll instead of mscvrt.dll
|
||||
if(NOT CMAKE_DLLTOOL)
|
||||
# cmake older than 3.16 doesn't know how to find dlltool
|
||||
find_program(CMAKE_DLLTOOL NAMES "x86_64-w64-mingw32-dlltool" "dlltool.exe" DOC "dlltool executable")
|
||||
endif()
|
||||
add_custom_command(OUTPUT "${PROJECT_BINARY_DIR}/ntdll.a"
|
||||
COMMAND "${CMAKE_DLLTOOL}" -d "${PROJECT_SOURCE_DIR}/ntdll.def" -l "${PROJECT_BINARY_DIR}/ntdll.a"
|
||||
MAIN_DEPENDENCY "${PROJECT_SOURCE_DIR}/ntdll.def"
|
||||
COMMENT "Building import library ntdll.a"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(ntdll_target DEPENDS "${PROJECT_BINARY_DIR}/ntdll.a")
|
||||
add_library(ntdll STATIC IMPORTED GLOBAL)
|
||||
add_dependencies(ntdll ntdll_target)
|
||||
set_target_properties(ntdll PROPERTIES IMPORTED_LOCATION "${PROJECT_BINARY_DIR}/ntdll.a")
|
||||
endif()
|
||||
|
||||
target_link_libraries(platform_Windows
|
||||
lg_common
|
||||
capture
|
||||
|
||||
userenv
|
||||
ntdll
|
||||
wtsapi32
|
||||
psapi
|
||||
shlwapi
|
||||
|
Reference in New Issue
Block a user