Skip to content

Commit 0c6f646

Browse files
bindings/csharp/CMakeLists.txt: Fix install step for CSharp bindings.
Debug symbols files (whether .pdb or .mdb) are created at build time not cmake generation time. So for a clean build, if those files are not found at cmake generation time, the install step for CSharp will not be properly done. Signed-off-by: Alexandra Trifan <[email protected]>
1 parent 135c189 commit 0c6f646

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bindings/csharp/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ if (MCS_EXECUTABLE)
6363

6464
if(NOT SKIP_INSTALL_ALL)
6565
set(DEBUG_SYMBOLS_FILE "")
66-
if(EXISTS "${LIBIIO_CS_DLL}.mdb")
66+
if(MCS_EXECUTABLE_NAME STREQUAL "mcs")
6767
set(DEBUG_SYMBOLS_FILE "${LIBIIO_CS_DLL}.mdb")
68-
elseif(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/libiio-sharp.pdb")
68+
elseif(MCS_EXECUTABLE_NAME STREQUAL "csc")
6969
set(DEBUG_SYMBOLS_FILE "${CMAKE_CURRENT_BINARY_DIR}/libiio-sharp.pdb")
7070
endif()
7171
install(FILES ${LIBIIO_CS_DLL} ${DEBUG_SYMBOLS_FILE} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cli/libiio-sharp-${VERSION})

0 commit comments

Comments
 (0)