Skip to content

Commit 1d9ca41

Browse files
fix python for MacOS
1 parent 8ca7196 commit 1d9ca41

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/lib/python/CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ swig_add_library(${PS_TARGET}
2828
LANGUAGE python
2929
OUTPUT_DIR ${PYTHON_PROJECT_DIR}
3030
SOURCES pokerstove.i)
31+
add_library(${PROJECT_NAMESPACE}::${PS_TARGET} ALIAS ${PS_TARGET})
32+
33+
# note: macOS is APPLE and also UNIX !
34+
if(APPLE)
35+
set_property(TARGET ${PS_TARGET} APPEND PROPERTY
36+
LINK_FLAGS "-flat_namespace -undefined suppress"
37+
)
38+
endif()
39+
3140

3241
# This is done to ensure that the .py wrapper and the .so file are in the
3342
# same location so that a properly set PYTHONPATH will pick them up.

0 commit comments

Comments
 (0)