SWIG build failure on windows: nds library not found
For the past few releases I have patched around an issue in the swig bindings package where the cmake build failes because it can't find the relevant ndscxx
library:
NMAKE : fatal error U1073: don't know how to make 'ndscxx-NOTFOUND' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\nmake.exe"' : return code '0x2' Stop.
My patch is here:
diff --git a/swig/python/python3/CMakeLists.txt b/swig/python/python3/CMakeLists.txt
index d403bf4..786ee1e 100644
--- a/swig/python/python3/CMakeLists.txt
+++ b/swig/python/python3/CMakeLists.txt
@@ -37,7 +37,7 @@ if ( NOT DEFINED ENABLE_SWIG_PYTHON3 OR ENABLE_SWIG_PYTHON3 )
${CMAKE_CURRENT_BINARY_DIR}/../module
${CMAKE_CURRENT_SOURCE_DIR}/../../common/module
${CMAKE_CURRENT_BINARY_DIR}/../../common/module
- ${nds2-client_INCLUDE_DIRS}
+ ${NDS_CLIENT_INCLUDE_DIRS}
${PYTHON3_NUMPY_INCLUDE_PATH}
${PYTHON3_INCLUDE_PATH}
)
@@ -59,7 +59,7 @@ if ( NOT DEFINED ENABLE_SWIG_PYTHON3 OR ENABLE_SWIG_PYTHON3 )
PREFIX PYTHON3
INTERFACE_FILE ${INTERFACE_FILE}
MODULE nds2
- LINK_LIBRARIES nds::cxx
+ LINK_LIBRARIES ${ndscxx_LIBRARY_PATH}
SWIG_FLAGS "-py3" "-shadow" "-importall" "-Wall" "-threads" "-O"
)
set( NDS_PYTHON_VERSION_MAJOR ${PYTHON3_VERSION_MAJOR} )
Is this appropriate to move some or all of this upstream?
Edited by Duncan Macleod