From cbd3e341b06067d2be6f6298b02dfd8aa211a164 Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Sat, 19 Nov 2022 12:28:13 -0800 Subject: [PATCH] Make Python bindings build as a standaline project With this change it builds both as an option of the overall avogadrolibs project and as a standalone project. Signed-off-by: Yuri Victorovich --- python/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 144d10ddde..fa1daa6dd3 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -1,3 +1,8 @@ +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) + +if (NOT TARGET AvogadroCore) + find_package(AvogadroLibs REQUIRED) +endif() find_package(PythonInterp 3 REQUIRED) find_package(PythonLibs 3 REQUIRED) set(PYBIND11_PYTHON_VERSION "3" CACHE STRING "")