the various ConstantExpr::get*Ty methods existed to work with issues around
[llvm/stm8.git] / tools / edis / CMakeLists.txt
blob9406c2a15cf83630bef5004de961573d4218b14a
1 include_directories(${CMAKE_CURRENT_BINARY_DIR})
3 set(SOURCES
4   ../../include/llvm-c/EnhancedDisassembly.h
5   EDMain.cpp
6   )
8 set(LLVM_LINK_COMPONENTS mcdisassembler)
9 if( LLVM_TARGETS_TO_BUILD MATCHES X86 )
10   list(APPEND LLVM_LINK_COMPONENTS x86asmprinter x86disassembler)
11 endif()
12 if( LLVM_TARGETS_TO_BUILD MATCHES ARM )
13   list(APPEND LLVM_LINK_COMPONENTS armasmprinter armdisassembler)
14 endif()
16 # TODO: Process EnhancedDisassembly.exports
18 if( NOT WIN32 AND LLVM_ENABLE_PIC )
19   set(bsl ${BUILD_SHARED_LIBS})
20   set(BUILD_SHARED_LIBS ON)
21   add_llvm_library(EnhancedDisassembly ${SOURCES})
22   set_property(TARGET EnhancedDisassembly PROPERTY
23     OUTPUT_NAME "EnhancedDisassembly")
24   set(BUILD_SHARED_LIBS ${bsl})
25   set(EnhancedDisassembly_STATIC_TARGET_NAME EnhancedDisassembly_static)
26 else()
27   set(EnhancedDisassembly_STATIC_TARGET_NAME EnhancedDisassembly)
28 endif()
30 if( NOT BUILD_SHARED_LIBS )
31   add_llvm_library(${EnhancedDisassembly_STATIC_TARGET_NAME} ${SOURCES})
32   set_property(TARGET ${EnhancedDisassembly_STATIC_TARGET_NAME} PROPERTY
33     OUTPUT_NAME "EnhancedDisassembly")
34 endif()