]> prime8.dev >> repos - ttyd.git/commitdiff
cmake: define _WIN32_WINNT and WINVER
authorShuanglei Tao <tsl0922@gmail.com>
Mon, 30 Oct 2023 15:45:44 +0000 (23:45 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Mon, 30 Oct 2023 15:56:32 +0000 (23:56 +0800)
CMakeLists.txt

index 27366f12c816e718678480a3718d8c4067a1d2d2..dc718027625bd8892974d5512a045d0af059efb6 100644 (file)
@@ -92,7 +92,10 @@ endif()
 add_executable(${PROJECT_NAME} ${SOURCE_FILES})
 target_include_directories(${PROJECT_NAME} PUBLIC ${INCLUDE_DIRS})
 target_link_libraries(${PROJECT_NAME} ${LINK_LIBS})
-target_compile_definitions(${PROJECT_NAME} PRIVATE TTYD_VERSION="${PROJECT_VERSION}")
+target_compile_definitions(${PROJECT_NAME} PUBLIC
+    TTYD_VERSION="${PROJECT_VERSION}"
+    $<$<PLATFORM_ID:Windows>:_WIN32_WINNT=0xa00 WINVER=0xa00>
+)
 
 include(GNUInstallDirs)