- cmake_minimum_required(VERSION 3.21)
- project(YaoyaoComputerHelper LANGUAGES CXX)
- if(NOT WIN32 OR NOT MSVC)
- message(FATAL_ERROR "Build this helper on Windows with MSVC and the Windows 10 SDK")
- endif()
- foreach(target computer-helper computer-helper-dev)
- add_executable(${target} computer-helper.cpp)
- target_compile_features(${target} PRIVATE cxx_std_17)
- target_compile_definitions(${target} PRIVATE UNICODE _UNICODE WIN32_LEAN_AND_MEAN NOMINMAX _WIN32_WINNT=0x0A00)
- target_compile_options(${target} PRIVATE /W4 /utf-8 /EHsc)
- set_property(TARGET ${target} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
- target_link_libraries(${target} PRIVATE windowsapp user32 advapi32 wtsapi32)
- endforeach()
- target_compile_definitions(computer-helper-dev PRIVATE DEVELOPMENT_HELPER)
|