Commit 04146795 authored by David E. DeMarle's avatar David E. DeMarle

Merge branch 'fix-apple-python-build' into 'master'

Don't explicitly link to Python on OS X

See merge request !24
parents b58dbefd 7d06c6a5
......@@ -196,7 +196,13 @@ if(XDMF_WRAP_PYTHON)
set_source_files_properties(${python_name}.i PROPERTIES CPLUSPLUS ON)
set(swig_extra_generated_files "")
swig_add_module(${python_name}Python python ${python_name}.i)
swig_link_libraries(${python_name}Python ${python_name} ${PYTHON_LIBRARIES})
if (NOT APPLE)
swig_link_libraries(${python_name}Python ${python_name} ${PYTHON_LIBRARIES})
else ()
swig_link_libraries(${python_name}Python ${python_name})
endif ()
set_property(DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES
${CMAKE_CURRENT_BINARY_DIR}/${python_name}.pyc
......@@ -218,6 +224,12 @@ if(XDMF_WRAP_PYTHON)
endif()
endif()
if(APPLE)
set_target_properties(${SWIG_MODULE_${python_name}Python_REAL_NAME}
PROPERTIES
LINK_FLAGS "-undefined dynamic_lookup")
endif()
set_target_properties(${SWIG_MODULE_${python_name}Python_REAL_NAME}
PROPERTIES
OUTPUT_NAME "_${python_name}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment