Skip to content

Commit

Permalink
Add Python_ROOT_DIR as argument
Browse files Browse the repository at this point in the history
cmake can have issues finding
the python distro>
add Python_ROOT_DIR parameter
  • Loading branch information
tpeulen committed Nov 14, 2024
1 parent 4fca3a4 commit 53edb05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cmake .. -G "NMake Makefiles" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY="%SP_DIR%" ^
-DCMAKE_SWIG_OUTDIR="%SP_DIR%" ^
-DPython_ROOT_DIR="%PREFIX%\bin" ^
-DPYTHON_VERSION="%PYTHON_VERSION_NUMERIC%" ^
-DBUILD_LIBRARY=OFF ^
-DWITH_AVX=OFF ^
Expand Down
5 changes: 2 additions & 3 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ mkdir b2 && cd b2
if [[ "${target_platform}" == osx-* ]]; then
# See https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
else
export CONFIG_ARGS=""
fi

cmake -S .. -B . \
Expand All @@ -15,9 +13,10 @@ cmake -S .. -B . \
-DBUILD_LIBRARY=OFF \
-DWITH_AVX=OFF \
-DBoost_USE_STATIC_LIBS=OFF \
-DPython_ROOT_DIR="${PREFIX}/bin" \
-DPYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')\
-G Ninja \
"${CONFIG_ARGS}"
${CONFIG_ARGS}

ninja install -j ${CPU_COUNT}

Expand Down

0 comments on commit 53edb05

Please sign in to comment.