Skip to content

Commit 066322d

Browse files
committed
fix win cmake flags for swig
1 parent cd83040 commit 066322d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@ if(UNIX AND NOT APPLE)
188188
else()
189189
list(APPEND CMAKE_SWIG_FLAGS -DSWIGWORDSIZE32)
190190
endif()
191+
elseif(WIN32)
192+
# Windows needs the word size defined as well
193+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
194+
list(APPEND CMAKE_SWIG_FLAGS -DSWIGWORDSIZE64)
195+
else()
196+
list(APPEND CMAKE_SWIG_FLAGS -DSWIGWORDSIZE32)
197+
endif()
198+
# Also define _WIN32 for the genicam.i file
199+
list(APPEND CMAKE_SWIG_FLAGS -D_WIN32)
191200
endif()
192201

193202
# Function to create a SWIG Python module

0 commit comments

Comments
 (0)