Added recipe for winsock2 and target_os to dependency conditions.
This commit is contained in:
23
recipes/winsock2/recipe.py
Normal file
23
recipes/winsock2/recipe.py
Normal 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']
|
||||
}
|
||||
Reference in New Issue
Block a user