intf_libs = # Interface dependencies.
impl_libs = # Implementation dependencies.

import impl_libs += libdirectx-headers%lib{directx-headers}

liba{directx-guids}: {hxx ixx txx cxx}{**} $impl_libs $intf_libs

# Build options.
#
out_pfx = [dir_path] $out_root/src/
src_pfx = [dir_path] $src_root/src/

cxx.poptions =+ "-I$out_pfx" "-I$src_pfx"

# upstream/CMakeLists.txt: MinGW RPC headers define old versions and conflict
# with D3D headers generated with newer MIDL.
#
if ($cxx.target.system == 'mingw32')
  cxx.poptions += -D__REQUIRED_RPCNDR_H_VERSION__=475

# Export options.
#
liba{directx-guids}:
{
  cxx.export.libs = $intf_libs
}

# For pre-releases use the complete version to make sure they cannot
# be used in place of another pre-release or the final version. See
# the version module for details on the version.* variable values.
#
if $version.pre_release
  liba{directx-guids}: bin.lib.version = "-$version.project_id"
else
  liba{directx-guids}: bin.lib.version = "-$version.major.$version.minor"

# Don't install private headers.
#
{hxx ixx txx}{*}: install = false
