From 8dc9becd41aa352496ca9c4b95c00160dec4599b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Gs=C3=A4nger?= Date: Mon, 2 Jan 2023 13:46:51 +0100 Subject: [PATCH] Build system fixes - re-enable UFF forcefield by setting correct lammps settings - use FindPython instead of FindPython3 --- CMakeLists.txt | 6 +++--- gui/qt/CMakeLists.txt | 3 ++- python/CMakeLists.txt | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cd4cf3b..3e33993c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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) diff --git a/gui/qt/CMakeLists.txt b/gui/qt/CMakeLists.txt index 3d9fbec2..6a905ce4 100644 --- a/gui/qt/CMakeLists.txt +++ b/gui/qt/CMakeLists.txt @@ -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: @@ -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 "") diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index d52a400f..de592294 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -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)