Added recipe for winsock2 and target_os to dependency conditions.

This commit is contained in:
2024-08-19 18:36:37 +02:00
parent 0175b812a2
commit 6cd076394d
2 changed files with 34 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
import os
from SCons.Script import *
def available(env: Environment):
if os.name != 'nt':
return 'Winsock2 is only available on Windows.'
def versions(env: Environment, update: bool = False):
if os.name == 'nt':
return [(0, 0, 0)]
else:
return []
def dependencies(env: Environment, version) -> 'dict':
return {}
def cook(env: Environment, version) -> dict:
return {
'LIBS': ['Ws2_32']
}