Skip to content

Commit

Permalink
Build system fixes
Browse files Browse the repository at this point in the history
- re-enable UFF forcefield by setting correct lammps settings
- use FindPython instead of FindPython3
  • Loading branch information
sgsaenger committed Jan 2, 2023
1 parent 70393e0 commit 8dc9bec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ else()
endif()

# VIPSTER_PYLIB - add python bindings for library, default to OFF
find_package(Python3 3.7 QUIET COMPONENTS Interpreter Development)
cmake_dependent_option(VIPSTER_PYLIB "Standalone Python library" OFF ${Python3_FOUND} OFF)
find_package(Python 3.7 QUIET COMPONENTS Interpreter Development)
cmake_dependent_option(VIPSTER_PYLIB "Standalone Python library" OFF ${Python_FOUND} OFF)

# VIPSTER_DESKTOP - add Qt-GUI target, default to ON if Qt available
find_package(Qt6 CONFIG QUIET COMPONENTS Widgets Gui OpenGLWidgets)
Expand All @@ -48,7 +48,7 @@ if(tmp AND NOT ${VIPSTER_DESKTOP})
endif()

# VIPSTER_PYWIDGET - optional python widget for Qt GUI, default to ON if possible
cmake_dependent_option(VIPSTER_PYWIDGET "Python shell in desktop app" ${Python3_FOUND} "VIPSTER_DESKTOP" OFF)
cmake_dependent_option(VIPSTER_PYWIDGET "Python shell in desktop app" ${Python_FOUND} "VIPSTER_DESKTOP" OFF)

# VIPSTER_LAMMPS - optional widget for interactive simulations, default to OFF
cmake_dependent_option(VIPSTER_LAMMPS "Interactive LAMMPS in desktop app" OFF "VIPSTER_DESKTOP" OFF)
Expand Down
3 changes: 2 additions & 1 deletion gui/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ if(VIPSTER_PYWIDGET)
FetchContent_MakeAvailable(pybind11)
add_definitions(-DUSE_PYTHON)
target_sources(vipster PRIVATE ${QTPY_SOURCES})
target_link_libraries(vipster PRIVATE bindings pybind11::embed Python3::Python)
target_link_libraries(vipster PRIVATE bindings pybind11::embed Python::Python)
endif()

# lammps-widget:
Expand Down Expand Up @@ -112,6 +112,7 @@ if(VIPSTER_LAMMPS)
set(LAMMPS_EXCEPTIONS ON CACHE INTERNAL "")
# enable simple and regularly used packages
set(PKG_MOLECULE ON CACHE BOOL "")
set(PKG_EXTRA-MOLECULE ON CACHE BOOL "")
set(PKG_MANYBODY ON CACHE BOOL "")
set(PKG_RIGID ON CACHE BOOL "")
set(PKG_KSPACE ON CACHE BOOL "")
Expand Down
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if(VIPSTER_PYLIB)

target_link_libraries(pyvipster PRIVATE bindings pybind11::module)

execute_process(COMMAND "${Python3_EXECUTABLE}" "-c"
execute_process(COMMAND "${Python_EXECUTABLE}" "-c"
"import sysconfig as s; print(s.get_path('platlib'))"
OUTPUT_VARIABLE PYTHON_SITE
OUTPUT_STRIP_TRAILING_WHITESPACE)
Expand Down

0 comments on commit 8dc9bec

Please sign in to comment.