Skip to content

Commit 5c44064

Browse files
committed
Fix linking with python with homebrew on Mac Os
1 parent 7c690bd commit 5c44064

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

INSTALL-cmake.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ Options
5555
- `enable-static`: compiles static libraries
5656
- `enable-doxygen-doc`: enable the generation of the API documentation
5757
using with `Doxygen`.
58+
- `disable_python_library_linking`: when set to `ON`, this option
59+
disables the link to `python` libraries. This is required when building
60+
against `anaconda` on `Mac OS`. This can be enabled by default because
61+
it will lead to a failure with the `python` version of homebrew.
5862

5963
`cmake` usefull variables
6064
=======================

bindings/python/src/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ function(mgis_python_module name output_name)
5050
MFrontGenericInterface ${CONAN_LIBS})
5151
endif(APPLE)
5252
else(MGIS_USES_CONAN)
53-
if(APPLE)
53+
if(disable_python_library_linking)
5454
target_link_libraries(${module}
5555
PRIVATE
5656
MFrontGenericInterface
5757
${Boost_NUMPY_LIBRARY} ${Boost_PYTHON_LIBRARY})
58-
else(APPLE)
58+
else(disable_python_library_linking)
5959
target_link_libraries(${module}
6060
PRIVATE
6161
MFrontGenericInterface
6262
${Boost_NUMPY_LIBRARY} ${Boost_PYTHON_LIBRARY} ${PYTHON_LIBRARIES})
63-
endif(APPLE)
63+
endif(disable_python_library_linking)
6464
endif(MGIS_USES_CONAN)
6565
# installation
6666
install(TARGETS ${module}

0 commit comments

Comments
 (0)