add_library(hwloc
${TOPDIR}/hwloc/topology.c
${TOPDIR}/hwloc/traversal.c
${TOPDIR}/hwloc/distances.c
${TOPDIR}/hwloc/memattrs.c
${TOPDIR}/hwloc/cpukinds.c
${TOPDIR}/hwloc/components.c
${TOPDIR}/hwloc/bind.c
${TOPDIR}/hwloc/bitmap.c
${TOPDIR}/hwloc/pci-common.c
${TOPDIR}/hwloc/diff.c
${TOPDIR}/hwloc/shmem.c
${TOPDIR}/hwloc/misc.c
${TOPDIR}/hwloc/base64.c
${TOPDIR}/hwloc/topology-noos.c
${TOPDIR}/hwloc/topology-synthetic.c
${TOPDIR}/hwloc/topology-xml.c
${TOPDIR}/hwloc/topology-xml-nolibxml.c
${TOPDIR}/hwloc/topology-windows.c
${TOPDIR}/hwloc/topology-x86.c
$<$<BOOL:${HWLOC_HAVE_LIBXML2}>:${TOPDIR}/hwloc/topology-xml-libxml.c>
$<$<BOOL:${HWLOC_HAVE_OPENCL}>:${TOPDIR}/hwloc/topology-opencl.c>
$<$<BOOL:${HAVE_CUDA}>:${TOPDIR}/hwloc/topology-cuda.c>
)