Skip to content

Commit

Permalink
fix for mac
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesneimog committed Jul 15, 2024
1 parent 1505637 commit 46e7fd1
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,20 @@ if (WIN32)
set(PYTHON_LD_FLAGS "-lpython${PYVERSION}")

else()
execute_process(
COMMAND python${PYVERSION}-config --ldflags
OUTPUT_VARIABLE PYTHON_LD_FLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE EXEC_RESULT)
execute_process(
COMMAND python${PYVERSION}-config --ldflags
OUTPUT_VARIABLE PYTHON_LD_FLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE EXEC_RESULT)

if(EXEC_RESULT)
message(FATAL_ERROR "Failed get Python include directory.")
endif()
if(EXEC_RESULT)
message(FATAL_ERROR "Failed get Python include directory.")
endif()
string(REPLACE " " ";" PYTHON_LD_FLAGS ${PYTHON_LD_FLAGS})
if (APPLE)
list(GET PYTHON_LD_FLAGS 0 PYTHON_LD_FLAGS)
endif()

string(REPLACE " " ";" PYTHON_LD_FLAGS ${PYTHON_LD_FLAGS})

endif()
# ──────────────────────────────────────
Expand Down

0 comments on commit 46e7fd1

Please sign in to comment.