added <xrc-file> tag to wxpresets
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -535,4 +535,7 @@
|
||||
</if>
|
||||
</define-global-tag>
|
||||
|
||||
|
||||
<include file="wx_xrc.bkl"/>
|
||||
|
||||
</makefile>
|
||||
|
72
build/bakefiles/wxpresets/presets/wx_xrc.bkl
Normal file
72
build/bakefiles/wxpresets/presets/wx_xrc.bkl
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!--
|
||||
|
||||
Bakefile XRC support; included by wx.bkl, do not include directly.
|
||||
|
||||
Usage:
|
||||
|
||||
<exe id="myapp" template="wxgui,simple">
|
||||
...
|
||||
<sources>...</sources>
|
||||
...
|
||||
<xrc-file>myapp.xrc</xrc-file>
|
||||
<xrc-file>file2.xrc</xrc-file>
|
||||
</exe>
|
||||
|
||||
Then in application code, you have to call initialization for every XRC
|
||||
file:
|
||||
|
||||
InitXMLResource_myapp();
|
||||
InitXMLResource_file2();
|
||||
|
||||
-->
|
||||
|
||||
<makefile>
|
||||
|
||||
<!-- XRC section -->
|
||||
<option name="WXRC" category="path">
|
||||
<description>Path to find the wxrc executable.</description>
|
||||
<default-value>wxrc</default-value>
|
||||
</option>
|
||||
|
||||
|
||||
<define-tag name="xrc-file" rules="exe,dll,lib">
|
||||
<set var="_xrc_file">$(value)</set>
|
||||
<set var="_xrc_cpp">$(value.replace('.xrc', '_xrc.cpp'))</set>
|
||||
<set var="_xrc_base">$(value[value.rfind('/')+1:value.rfind('.')])</set>
|
||||
<set var="_wxrc_options">-c -n InitXMLResource_$(_xrc_base)</set>
|
||||
|
||||
<sources>$(_xrc_cpp)</sources>
|
||||
<if cond="FORMAT not in ['msvc6prj','msvs2003prj','msvs2005prj']">
|
||||
<clean-files>$(_xrc_cpp)</clean-files>
|
||||
<add-target target="$(_xrc_cpp)" type="action"/>
|
||||
<modify-target target="$(_xrc_cpp)">
|
||||
<set var="_xrc">$(_xrc_file)</set>
|
||||
<depends-on-file>$(SRCDIR)/$(_xrc)</depends-on-file>
|
||||
<command>
|
||||
$(WXRC) $(_wxrc_options) -o $(_xrc_cpp) $(_xrc)
|
||||
</command>
|
||||
</modify-target>
|
||||
</if>
|
||||
<if cond="FORMAT in ['msvc6prj','msvs2003prj','msvs2005prj']">
|
||||
<sources>$(_xrc_file)</sources>
|
||||
<!--
|
||||
A hack to add XRC compilation step to MSVC projects.
|
||||
|
||||
NB: it's important to use backslashes and not slashes here.
|
||||
-->
|
||||
<set var="_custom_build_files" append="1">$(_xrc_file.replace('/','\\'))</set>
|
||||
<set var="_custom_build_$(_xrc_file.replace('/','_').replace('.','_'))">
|
||||
Compiling XRC resources: $(_xrc_file)...
|
||||
InputPath=$(_xrc_file)
|
||||
|
||||
"$(_xrc_cpp.replace('/','\\'))" : "$(DOLLAR)(INTDIR)"
|
||||
$(TAB)$(WXRC) $(_wxrc_options) -o $(_xrc_cpp) $(_xrc_file)
|
||||
</set>
|
||||
</if>
|
||||
|
||||
</define-tag>
|
||||
|
||||
</makefile>
|
Reference in New Issue
Block a user