Skip to content

Commit

Permalink
bindings/csharp/CMakeLists.txt: Fix the install step for CSharp bindi…
Browse files Browse the repository at this point in the history
…ngs.

.mdb files are created by Mono, while .pdb files are created by the CSC
C# compiler. Building on Windows, a .pdb file will be generated and
the process should not fail at INSTALL time.

.mbd files will be names libiio-sharp.dll.mdb, while .pdb files will be
named libiio-sharp.pdb.

Signed-off-by: Alexandra Trifan <Alexandra.Trifan@analog.com>
  • Loading branch information
AlexandraTrifan committed Jan 13, 2020
1 parent 3d582f2 commit 8b57196
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bindings/csharp/CMakeLists.txt
Expand Up @@ -64,7 +64,13 @@ if (MCS_EXECUTABLE)
add_custom_target(libiio-sharp ALL DEPENDS ${LIBIIO_CS_DLL})

if(NOT SKIP_INSTALL_ALL)
install(FILES ${LIBIIO_CS_DLL} ${LIBIIO_CS_DLL}.mdb DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cli/libiio-sharp-${VERSION})
set(DEBUG_SYMBOLS_FILE "")
if(EXISTS "${LIBIIO_CS_DLL}.mdb")
set(DEBUG_SYMBOLS_FILE "${LIBIIO_CS_DLL}.mdb")
elseif(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/libiio-sharp.pdb")
set(DEBUG_SYMBOLS_FILE "${CMAKE_CURRENT_BINARY_DIR}/libiio-sharp.pdb")
endif()
install(FILES ${LIBIIO_CS_DLL} ${DEBUG_SYMBOLS_FILE} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cli/libiio-sharp-${VERSION})
endif()
endif()
endif()

0 comments on commit 8b57196

Please sign in to comment.