Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export CMAKE_PREFIX_PATH in helper installation scripts #2887

Merged
merged 6 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cpp/cmake/templates/dolfinx.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
export @OS_LIBRARY_PATH_NAME@=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@:$@OS_LIBRARY_PATH_NAME@
export PATH=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@:$PATH
export PKG_CONFIG_PATH=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/pkgconfig:$PKG_CONFIG_PATH
export CMAKE_PREFIX_PATH=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/cmake:$CMAKE_PREFIX_PATH

# Special macOS variables
export DYLD_FRAMEWORK_PATH=/opt/local/Library/Frameworks:$DYLD_FRAMEWORK_PATH
1 change: 1 addition & 0 deletions docker/Dockerfile.end-user
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ ONBUILD RUN cd dolfinx && \

# Real by default.
ONBUILD ENV PKG_CONFIG_PATH=/usr/local/dolfinx-real/lib/pkgconfig:$PKG_CONFIG_PATH \
CMAKE_PREFIX_PATH=/usr/local/dolfinx-real/lib/cmake:$CMAKE_PREFIX_PATH \
PETSC_ARCH=linux-gnu-real64-32 \
PYTHONPATH=/usr/local/dolfinx-real/lib/python${PYTHON_VERSION}/dist-packages:$PYTHONPATH \
LD_LIBRARY_PATH=/usr/local/dolfinx-real/lib:$LD_LIBRARY_PATH
Expand Down
1 change: 1 addition & 0 deletions docker/dolfinx-complex-mode
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
PYV=`python3 -c "import sys;t='{v[0]}.{v[1]}'.format(v=list(sys.version_info[:2]));sys.stdout.write(t)";`
export PKG_CONFIG_PATH=/usr/local/dolfinx-complex/lib/pkgconfig:$PKG_CONFIG_PATH
export CMAKE_PREFIX_PATH=/usr/local/dolfinx-complex/lib/cmake:$CMAKE_PREFIX_PATH
export PETSC_ARCH=linux-gnu-complex128-32
export PYTHONPATH=/usr/local/dolfinx-complex/lib/python$PYV/dist-packages:$PYTHONPATH
export LD_LIBRARY_PATH=/usr/local/dolfinx-complex/lib:$LD_LIBRARY_PATH
1 change: 1 addition & 0 deletions docker/dolfinx-real-mode
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
PYV=`python3 -c "import sys;t='{v[0]}.{v[1]}'.format(v=list(sys.version_info[:2]));sys.stdout.write(t)";`
export PKG_CONFIG_PATH=/usr/local/dolfinx-real/lib/pkgconfig:$PKG_CONFIG_PATH
export CMAKE_PREFIX_PATH=/usr/local/dolfinx-real/lib/cmake:$CMAKE_PREFIX_PATH
export PETSC_ARCH=linux-gnu-real64-32
export PYTHONPATH=/usr/local/dolfinx-real/lib/python$PYV/dist-packages:$PYTHONPATH
export LD_LIBRARY_PATH=/usr/local/dolfinx-real/lib:$LD_LIBRARY_PATH
4 changes: 2 additions & 2 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ execute_process(
ERROR_VARIABLE BASIX_ERROR_OUT OUTPUT_STRIP_TRAILING_WHITESPACE
)
find_package(Basix REQUIRED CONFIG HINTS ${BASIX_PY_DIR})
message(STATUS "Found Basix at ${BASIX_DIR}")
francesco-ballarin marked this conversation as resolved.
Show resolved Hide resolved
find_package(DOLFINX REQUIRED CONFIG)
message(STATUS "Found DOLFINx at ${DOLFINX_DIR}")
francesco-ballarin marked this conversation as resolved.
Show resolved Hide resolved

# Create the binding library nanobind handles its own calls to
# target_link_libraries
nanobind_add_module(
cpp
MODULE

# NB_SHARED
dolfinx/wrappers/dolfinx.cpp
dolfinx/wrappers/assemble.cpp
dolfinx/wrappers/common.cpp
Expand Down