LookingGlass/host/platform/Windows/CMakeLists.txt
Geoffrey McRae 9a6b598438 [host] Windows: Implemented service to launch LG as the SYSTEM user
Experimental, use at your own peril!

This commit adds the ability for the LG host to install and launch with
Windows as a system service.

To install simply run `looking-glass-host.exe InstallService` or
conversely to uninstall `looking-glass-host.exe UninstallService`.
2020-08-11 12:22:22 +10:00

36 lines
726 B
CMake

cmake_minimum_required(VERSION 3.0)
project(platform_Windows LANGUAGES C)
include_directories(
${PROJECT_SOURCE_DIR}/include
)
add_library(platform_Windows STATIC
src/platform.c
src/service.c
src/mousehook.c
)
add_subdirectory("capture")
FIND_PROGRAM(WINDRES_EXECUTABLE NAMES "x86_64-w64-mingw32-windres" "windres.exe" DOC "windres executable")
ADD_CUSTOM_COMMAND(TARGET platform_Windows POST_BUILD
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
COMMAND ${WINDRES_EXECUTABLE} -i resource.rc -o "${PROJECT_BINARY_DIR}/resource.o"
VERBATIM
)
target_link_libraries(platform_Windows
"${PROJECT_BINARY_DIR}/resource.o"
lg_common
capture
userenv
wtsapi32
)
target_include_directories(platform_Windows
PRIVATE
src
)