Skip to content

Commit

Permalink
Fixed backslash in Windows includes for swig
Browse files Browse the repository at this point in the history
  • Loading branch information
dacuster committed Dec 4, 2024
1 parent 5b6b7ce commit f9fd69b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MSCL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ endif()
# Optionally generate the language bindings using swig
if(MSCL_BUILD_PYTHON2 OR MSCL_BUILD_PYTHON3 OR MSCL_BUILD_CSHARP)
include(UseSWIG)
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/mscl_python_swig.cmake)
include(mscl_python_swig)

if(MSVC)
# Linking through the MSCL cmake interface causes linker error 4197. This is related to swig and can be ignored
Expand Down Expand Up @@ -326,6 +326,11 @@ if(MSCL_BUILD_PYTHON2 OR MSCL_BUILD_PYTHON3 OR MSCL_BUILD_CSHARP)
endif()
endif()

# Fix the include paths on Windows to remove backslashes
if(WIN32)
list(TRANSFORM LIB_INCLUDE_DIRS REPLACE "\\\\" "/")
endif()

# Build for python3
if(MSCL_BUILD_PYTHON3)
set(PYTHON3_MODULE_NAME MSCL_Python3)
Expand Down

0 comments on commit f9fd69b

Please sign in to comment.