From e7ae6694627484d73611f6411b5508cc1d46e395 Mon Sep 17 00:00:00 2001 From: Olivier Stasse Date: Mon, 25 May 2020 10:06:34 +0200 Subject: [PATCH] (python.cmake) Testing if the OS is pure UNIX and NOT MacOS --- python.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python.cmake b/python.cmake index 03bd2e786..7d8f3e435 100644 --- a/python.cmake +++ b/python.cmake @@ -313,7 +313,9 @@ MACRO(DYNAMIC_GRAPH_PYTHON_MODULE SUBMODULENAME LIBRARYNAME TARGETNAME) ) CMAKE_POLICY(POP) - TARGET_LINK_LIBRARIES(${PYTHON_MODULE} ${PUBLIC_KEYWORD} "-Wl,--no-as-needed") + IF (UNIX AND NOT APPLE) + TARGET_LINK_LIBRARIES(${PYTHON_MODULE} ${PUBLIC_KEYWORD} "-Wl,--no-as-needed") + ENDIF(UNIX AND NOT APPLE) TARGET_LINK_LIBRARIES(${PYTHON_MODULE} ${PUBLIC_KEYWORD} ${LIBRARYNAME} ${PYTHON_LIBRARY}) TARGET_INCLUDE_DIRECTORIES(${PYTHON_MODULE} SYSTEM PRIVATE ${PYTHON_INCLUDE_DIRS})