JamPlus manual
Win32 Resource Support
IncludeModule c/win32resource ;

List of Rules

Rules


rule C.RcDefines TARGET [ : RESOURCE_NAME ] : DEFINES

For the given project TARGET, assign the DEFINES for the resource file compilation.

Parameters
TARGETThe target to assign the DEFINES to. TARGET is optional if rule ActiveTarget TARGET has been specified. If TARGET is *, the defines are made available globally.
RESOURCE_NAME(optional) When present, the DEFINES are applied to the specified .rc file.
DEFINESThe list of defines to apply.
# Make #defines available for ABC and DEF=5 in all of someproject's
# .rc files.
C.RcDefines someproject : ABC DEF=5 ;
# Add a WIN32 define globally.
C.RcDefines * : WIN32 ;
# For the AddIn.rc file, add a #define called SPECIAL_BUILD:
C.RcDefines myproject : AddIn.rc : SPECIAL_BUILD ;

rule C.RcFlags TARGET [ : RESOURCE_NAME ] : FLAGS

For the given project TARGET, assign the FLAGS for the resource file compilation.

Parameters
TARGETThe target to assign the FLAGS to. TARGET is optional if rule ActiveTarget TARGET has been specified. If TARGET is *, the flags are made available globally.
RESOURCE_NAME(optional) When present, the FLAGS are applied to the specified .rc file.
FLAGSThe list of flags to apply.
# Turn on verbose mode for all of someproject's .rc files.
C.RcFlags someproject : /v ;
# Add the /y flag to all .rc files.
C.RcFlags * : /y ;
# For the AddIn.rc file, turn on verbose mode.
C.RcFlags myproject : AddIn.rc : /v ;

rule C.RcIncludeDirectories TARGET [ : RESOURCE_NAME ] : HDRS

For the given project TARGET, assign the include directories specified in HDRS to the resource file compilation.

Parameters
TARGETThe target to assign the HDRS to. TARGET is optional if rule ActiveTarget TARGET has been specified. If TARGET is *, the include directories are made available globally.
RESOURCE_NAME(optional) When present, the HDRS are applied to the specified .rc file.
HDRSThe list of include directories to apply.
# Make include directories available for all of someproject's .rc files.
C.RcIncludeDirectories someproject : c:/mylibrary ;
# Add $(LOCATE_SOURCE) include directory to all .rc files.
C.RcIncludeDirectories * : $(LOCATE_SOURCE) ;
# For the AddIn.rc file, add $(LOCATE_SOURCE) as a search path.
C.RcIncludeDirectories myproject : AddIn.rc : $(LOCATE_SOURCE) ;

rule C.ResourceCompiler PARENT : SOURCES [ : OPTIONS ]

Compiles a resource .rc file into a .res file.

#defines made available by the rule C.RcDefines TARGET [ : RESOURCE_NAME ] : DEFINES rule are applied in the following order: PARENT then *.

Compilation flags made available by the rule C.RcFlags TARGET [ : RESOURCE_NAME ] : FLAGS rule are applied in the following order: PARENT then *.

Include directories made available by the rule C.RcIncludeDirectories TARGET [ : RESOURCE_NAME ] : HDRS are looked up in this order: , PARENT, *, , then .

Parameters
PARENTThe parent target to which the resource file belongs. This is needed to properly grist the resource filenames.
SOURCESThe .rc file to be compiled.
OPTIONS(optional) The following options are available.

  • quiet - Typically not user specified. Used internally by the manifest generation script.

Returns
Returns the gristed filename of the compiled resource, suitable for passing directly to the Application or Library rules.
# Compile SimpleMFC.rc into SimpleMFC.res.
SRCS += [ C.ResourceCompiler SimpleMFC : SimpleMFC.rc ] ;