summaryrefslogtreecommitdiff
path: root/src/ToolBox/SOS/DacTableGen/CMakeLists.txt
blob: c980cc2ff8be832f469c46f4c3e5c5f609bf11cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
set(DACTABLEGEN_SOURCES
    cvconst.cs
    diautil.cs
    main.cs
    MapSymbolProvider.cs
)

# Cmake does not support csharp sources so add custom command
add_custom_target(dactablegen ALL 
    COMMAND csc.exe /t:exe /platform:anycpu32bitpreferred /r:System.dll /r:DiaLib.dll /out:${CMAKE_CURRENT_BINARY_DIR}/dactablegen.exe ${DACTABLEGEN_SOURCES}
    COMMAND ${CMAKE_COMMAND} -E copy DIAlib.dll ${CMAKE_CURRENT_BINARY_DIR}
    DEPENDS ${DACTABLEGEN_SOURCES} DIAlib.dll
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

# In order to use dactablegen as an executable target it needs to be imported. 
# Target is used in dll/mscoree/coreclr/cmakelists.txt
add_executable(dactablegen_exe IMPORTED GLOBAL)
set_property(TARGET dactablegen_exe PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/dactablegen.exe)