Skip to content

Commit 605117f

Browse files
committed
Fix building
1 parent accd333 commit 605117f

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

cmake/yup_modules.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,12 @@ function (yup_add_module module_path modules_definitions module_group)
524524
# ==== Fetch Python if needed
525525
if (module_needs_python)
526526
_yup_fetch_python ("${Python_ROOT_DIR}" "${YUP_ENABLE_STATIC_PYTHON_LIBS}")
527-
list (APPEND module_libs Python::Python)
527+
if (NOT YUP_BUILD_WHEEL)
528+
list (APPEND module_libs Python::Python)
529+
if (YUP_PLATFORM_MAC)
530+
list (APPEND module_link_options "-Wl,-weak_reference_mismatches,weak")
531+
endif()
532+
endif()
528533
if (NOT "${Python_INCLUDE_DIRS}" STREQUAL "")
529534
list (APPEND module_include_paths "${Python_INCLUDE_DIRS}")
530535
endif()

python/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,13 @@ yup_standalone_app (
5959
yup::yup_gui
6060
yup::yup_python)
6161

62-
set_target_properties (${target_name} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
63-
set_target_properties (${target_name} PROPERTIES VISIBILITY_INLINES_HIDDEN TRUE)
64-
set_target_properties (${target_name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
65-
set_target_properties (${target_name} PROPERTIES OUTPUT_NAME "${target_name}")
66-
set_target_properties (${target_name} PROPERTIES PREFIX "")
62+
set_target_properties (${target_name} PROPERTIES
63+
CXX_EXTENSIONS OFF
64+
CXX_VISIBILITY_PRESET hidden
65+
VISIBILITY_INLINES_HIDDEN TRUE
66+
POSITION_INDEPENDENT_CODE TRUE
67+
OUTPUT_NAME "${target_name}"
68+
PREFIX "")
6769

6870
if (APPLE)
6971
set_target_properties (${target_name} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")

0 commit comments

Comments
 (0)