mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
1761ea2b9b
Instead of using %windir%\Temp, which is not accessible by default and contains a lot of unrelated files, as the location for our log files, this commit moves it to %ProgramData%\Looking Glass (host), which will be a dedicated directory just for the LG host log files. This applies to both the host application logs and the service logs. Also, we now switched to using PathCombineA from shlwapi.dll instead of using snprintf, which greatly simplifies the code. PathCombineA guarantees that the path would not overflow a buffer of MAX_PATH.
47 lines
1.2 KiB
CMake
47 lines
1.2 KiB
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
|
|
src/force_compose.c
|
|
)
|
|
|
|
# allow use of functions for Windows Vista or later
|
|
add_definitions(-D _WIN32_WINNT=0x6000)
|
|
|
|
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
|
|
psapi
|
|
shlwapi
|
|
)
|
|
|
|
target_include_directories(platform_Windows
|
|
PRIVATE
|
|
src
|
|
)
|
|
|
|
# these are for the nsis installer generator
|
|
configure_file("${PROJECT_SOURCE_DIR}/installer.nsi" "${PROJECT_BINARY_DIR}/installer.nsi" COPYONLY)
|
|
configure_file("${PROJECT_TOP}/resources/icon.ico" "${PROJECT_BINARY_DIR}/icon.ico" COPYONLY)
|
|
configure_file("${PROJECT_TOP}/LICENSE" "${PROJECT_BINARY_DIR}/LICENSE.txt" COPYONLY)
|