add_llvm_library(LLVMMCDisassembler
  Disassembler.cpp
  EDDisassembler.cpp
  EDInst.cpp
  EDOperand.cpp
  EDToken.cpp
  )

add_llvm_library_dependencies(LLVMMCDisassembler
  LLVMARMAsmParser
  LLVMARMDesc
  LLVMARMDisassembler
  LLVMARMInfo
  LLVMAlphaDesc
  LLVMAlphaInfo
  LLVMBlackfinDesc
  LLVMBlackfinInfo
  LLVMCBackendInfo
  LLVMCellSPUDesc
  LLVMCellSPUInfo
  LLVMCppBackendInfo
  LLVMMBlazeAsmParser
  LLVMMBlazeDesc
  LLVMMBlazeDisassembler
  LLVMMBlazeInfo
  LLVMMC
  LLVMMCParser
  LLVMMSP430Desc
  LLVMMSP430Info
  LLVMMipsDesc
  LLVMMipsInfo
  LLVMPTXDesc
  LLVMPTXInfo
  LLVMPowerPCDesc
  LLVMPowerPCInfo
  LLVMSparcDesc
  LLVMSparcInfo
  LLVMSupport
  LLVMSystemZDesc
  LLVMSystemZInfo
  LLVMTarget
  LLVMX86AsmParser
  LLVMX86Desc
  LLVMX86Disassembler
  LLVMX86Info
  LLVMXCoreDesc
  LLVMXCoreInfo
  )

add_llvm_library(LLVMMCDisassembler
  Disassembler.cpp
  EDDisassembler.cpp
  EDInst.cpp
  EDOperand.cpp
  EDToken.cpp
  )

add_llvm_library_dependencies(LLVMMCDisassembler
  LLVMMC
  LLVMMCParser
  LLVMSupport
  LLVMTarget
  )

foreach(t ${LLVM_TARGETS_TO_BUILD})
  set(td ${LLVM_MAIN_SRC_DIR}/lib/Target/${t})
  if(EXISTS ${td}/Disassembler/CMakeLists.txt)
    add_llvm_library_dependencies(LLVMMCDisassembler "LLVM${t}Disassembler")
  endif()
endforeach(t)

Fix the MCDisassembler dependencies. These were just absurdly wrong.
Fix the MCDisassembler dependencies. These were just absurdly wrong.

First off, only depend on the actual MC-ized disassemblers in the
targets, not all of the libraries those in turn depend on.

Second off, only depend on those MC-ized disassemblers for targets we're
building.

This should fix builds of fewer than all targets.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@136455 91177308-0d34-0410-b5e6-96231b3b80d8
