Skip to content

Commit

Permalink
fix python for MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewprock-anari committed Jul 26, 2024
1 parent 8ca7196 commit 1d9ca41
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ swig_add_library(${PS_TARGET}
LANGUAGE python
OUTPUT_DIR ${PYTHON_PROJECT_DIR}
SOURCES pokerstove.i)
add_library(${PROJECT_NAMESPACE}::${PS_TARGET} ALIAS ${PS_TARGET})

# note: macOS is APPLE and also UNIX !
if(APPLE)
set_property(TARGET ${PS_TARGET} APPEND PROPERTY
LINK_FLAGS "-flat_namespace -undefined suppress"
)
endif()


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

0 comments on commit 1d9ca41

Please sign in to comment.