Copy the .rc file and build separately for each extension module

This commit is contained in:
Robin Dunn
2019-06-21 20:12:01 -07:00
parent 77daf71259
commit f57961ca0e

21
wscript
View File

@@ -658,6 +658,15 @@ def copyFileToPkg(task):
return 0
def simpleCopy(task):
import shutil
src = task.inputs[0].abspath()
tgt = task.outputs[0].abspath()
print("{} --> {}".format(src, tgt))
shutil.copy(src, tgt)
return 0
# Copy all the items in env with a matching postfix to a similarly
# named item with the dest postfix.
def _copyEnvGroup(env, srcPostfix, destPostfix):
@@ -673,7 +682,17 @@ def makeETGRule(bld, etgScript, moduleName, libFlags):
from buildtools.config import loadETG, getEtgSipCppFiles
addRelwithdebugFlags(bld, moduleName)
rc = ['src/wxc.rc'] if isWindows else []
rc = []
if isWindows:
rc_name = moduleName + '.rc'
bld(rule=simpleCopy,
source='src/wxc.rc',
target=rc_name,
#before=moduleName+'.res'
)
rc = [rc_name]
etg = loadETG(etgScript)
bld(features='c cxx cxxshlib pyext',
target=makeTargetName(bld, moduleName),