]> git.lyx.org Git - lyx.git/blobdiff - development/scons/SConstruct
- new documentation
[lyx.git] / development / scons / SConstruct
index 918e7336832f63f9b0d3c6add6d482315a29c343..1aa414edfb3b03a54e8f5a638fff91ce78b66289 100644 (file)
@@ -419,6 +419,10 @@ if platform_name == 'win32':
     else:
         env.Tool('mingw')
         env.AppendUnique(CPPPATH = ['#c:/MinGW/include'])
+        # fix a scons winres bug (there is a missing space between ${RCINCPREFIX} and ${SOURCE.dir}
+        # in version 0.96.93
+        env['RCCOM'] = '$RC $_CPPDEFFLAGS $RCINCFLAGS ${RCINCPREFIX} ${SOURCE.dir} $RCFLAGS -i $SOURCE -o $TARGET'
+    
 
 # we differentiate between hard-coded options and default options
 # hard-coded options are required and will always be there
@@ -1268,6 +1272,8 @@ if frontend == 'qt4':
         if os.path.isdir(os.path.join(frontend_env['qt_dir'], 'bin')):
             os.environ['PATH'] += os.pathsep + os.path.join(frontend_env['qt_dir'], 'bin')
             frontend_env.PrependENVPath('PATH', os.path.join(frontend_env['qt_dir'], 'bin'))
+        if os.path.isdir(os.path.join(frontend_env['qt_dir'], 'lib')):
+            frontend_env.PrependENVPath('PKG_CONFIG_PATH', os.path.join(frontend_env['qt_dir'], 'lib'))
 
     # if separate qt_lib_path is given
     if frontend_env.has_key('qt_lib_path') and frontend_env['qt_lib_path']:
@@ -1317,7 +1323,7 @@ if frontend == 'qt4':
     if not succ:
         # Under linux, I can test the following perfectly
         # Under windows, lib names need to passed as libXXX4.a ...
-        if platform_name == 'win32' and use_vc:
+        if platform_name == 'win32':
             succ = conf.CheckLibWithHeader('QtCore4', 'QtGui/QApplication', 'c++', 'QApplication qapp();')
         else:
             succ = conf.CheckLibWithHeader('QtCore', 'QtGui/QApplication', 'c++', 'QApplication qapp();')
@@ -1365,11 +1371,10 @@ if frontend == 'qt4':
             else:
                 manifest = 'QtGui4.dll.manifest'
         if os.path.isfile(manifest):
-            env['LINKCOM'] = [env['LINKCOM'], 'mt.exe /MANIFEST %s /outputresource:$TARGET;1' % manifest]
+            frontend_env['LINKCOM'] = [frontend_env['LINKCOM'], 'mt.exe /MANIFEST %s /outputresource:$TARGET;1' % manifest]
 
     frontend_env = conf.Finish()
 
-
 #
 # Report results
 #
@@ -1721,6 +1726,7 @@ if build_qt4:
             '$BUILDDIR/common/frontends/controllers'
         ],
         CCFLAGS =  [
+            '$CCFLAGS',
             '-DHAVE_CONFIG_H',
             '-DQT_CLEAN_NAMESPACE',
             '-DQT_GENUINE_STR',
@@ -1744,7 +1750,8 @@ if build_client:
             target = '$BUILDDIR/common/client/lyxclient',
             LIBS = ['support'] + intl_libs + system_libs +
                 socket_libs + boost_libraries + qtcore_lib,
-            source = ['$BUILDDIR/common/client/%s' % x for x in src_client_files]
+            source = ['$BUILDDIR/common/client/%s' % x for x in src_client_files] + \
+                utils.createResFromIcon(frontend_env, 'lyx_32x32.ico', '$LOCALLIBPATH/client.rc')
         )
         Alias('client', frontend_env.Command(os.path.join('$BUILDDIR', os.path.split(str(client[0]))[1]),
             client, [Copy('$TARGET', '$SOURCE')]))
@@ -1774,7 +1781,8 @@ if build_tex2lyx:
     tex2lyx = frontend_env.Program(
         target = '$BUILDDIR/common/tex2lyx/tex2lyx',
         LIBS = ['support'] + boost_libraries + intl_libs + system_libs + qtcore_lib,
-        source = ['$BUILDDIR/common/tex2lyx/%s' % x for x in src_tex2lyx_files],
+        source = ['$BUILDDIR/common/tex2lyx/%s' % x for x in src_tex2lyx_files] + \
+            utils.createResFromIcon(frontend_env, 'lyx_32x32.ico', '$LOCALLIBPATH/tex2lyx.rc'),
         CPPPATH = ['$BUILDDIR/common/tex2lyx', '$CPPPATH'],
         LIBPATH = ['#$LOCALLIBPATH', '$LIBPATH'],
     )
@@ -1822,7 +1830,8 @@ if build_lyx:
     #
     lyx = frontend_env.Program(
         target = '$BUILDDIR/lyx',
-        source = ['$BUILDDIR/common/main.C'],
+        source = ['$BUILDDIR/common/main.C'] + \
+            utils.createResFromIcon(frontend_env, 'lyx_32x32.ico', '$LOCALLIBPATH/lyx.rc'),
         LIBS = [
             'lyxbase_pre',
             'mathed',