This is a header only library that allows you to quickly write a Windows Service by using a simple interface if you're using CMake 3.19+. It is also structured according to https://github.com/robotology/how-to-export-cpp-library#-other-template-and-examples.
This is a fork from a MIT licensed windows-service template created by Mikko Saarinki and located here https://github.com/Kingston1/windows-service.
This fork attempts to make this repo into something that can be used by other CMake projects easily with the following CMake:
include(FetchContent)
FetchContent_Declare(
LibWindowsService
GIT_REPOSITORY https://github.com/Allar/windows-service
GIT_TAG 1.0
)
FetchContent_MakeAvailable(LibWindowsService)
And CMake for linking:
target_link_libraries(${EXE_TARGET_NAME} LibWindowsService)
An example on how to use this Windows Service library can be found at https://github.com/Allar/windows-service-example.
I forked and made this repo so I can easily write Windows Services without understanding how to write a Windows Service and completely abstract this away from myself. I have no idea about the implementation details and am really not qualified to maintain this repo. Please raise issues and pull requests if you're you could be so inclined.
- Document how to use this
- Add notification tray icon support
- Write meaningful tests
- Set up CI stuff