]> git.lyx.org Git - lyx.git/blobdiff - development/scons/scons_utils.py
fix encoding.
[lyx.git] / development / scons / scons_utils.py
index 4749bf882eacbbf5823d157c5b34d4a0d33f3fa6..b9aca61be6cd205be29c49146147896f37578ffb 100644 (file)
@@ -186,6 +186,17 @@ def createResFromIcon(env, icon_file, rc_file):
         return []
 
 
+def env_qtResource(target, source, env):
+    '''Create resource.qrc'''
+    qrc = open(str(target[0]), 'w')
+    print >> qrc, "<!DOCTYPE RCC><RCC version='1.0'><qresource>"
+    for file in source:
+        rel_file = relativePath(str(file), env.subst('$TOP_SRCDIR/lib'))
+        abs_file = str(file.abspath)
+        print >> qrc, '<file alias="%s">%s</file>' % (rel_file, abs_file)
+    print >> qrc, '</qresource></RCC>'
+    qrc.close()
+
 #
 # autoconf tests
 #
@@ -237,7 +248,7 @@ int main()
 '''
     conf.Message('Checking for the use of global cstd... ')
     # if can not compile, define CXX_GLOBAL_CSTD
-    ret = not conf.TryLink(check_global_cstd_source, '.c')
+    ret = conf.TryLink(check_global_cstd_source, '.cpp')
     conf.Result(ret)
     return ret
 
@@ -416,7 +427,7 @@ int main() {
 }
 '''
     conf.Message('Checking if the declaration of iconv needs const... ')
-    ret = conf.TryLink(check_iconv_const, '.c')
+    ret = conf.TryLink(check_iconv_const, '.cpp')
     conf.Result(ret)
     return ret