Skip to content
Merged
Changes from all 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
27 changes: 25 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ cmake_minimum_required(VERSION 3.14)
# Downloads common CMake modules used throughout NWChemEx
include(cmake/get_nwx_cmake.cmake)

#Sets the version to whatever git thinks it is
# Sets the version to whatever git thinks it is
include(get_version_from_git)
get_version_from_git(pluginplay_version "${CMAKE_CURRENT_LIST_DIR}")
project(pluginplay VERSION "${pluginplay_version}" LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)

include(get_cmaize)
include(nwx_find_package)

# Work out full paths to the project's include/source dirs
set(project_inc_dir "${CMAKE_CURRENT_LIST_DIR}/include/${PROJECT_NAME}")
Expand Down Expand Up @@ -70,10 +71,32 @@ set(pluginplay_depends utilities parallelzone libfort Boost::boost RocksDB)
# targets separately instead of a CMaize target
include(nwx_pybind11)
if("${BUILD_PYBIND11_PYBINDINGS}")
nwx_find_package(
Python3
# NOTE: Right now only the first component is added to find_dependency()
# so Development is listed first since it provides Python3::Python
COMPONENTS Development Interpreter
REQUIRED
TARGETS
python Python3::Python
)

nwx_find_pybind11()
nwx_find_package(
pybind11
# pybind11 won't be found if it is built in the above nwx_find_pybind11().
# QUIET helps hide the error that would be output and even though
# pybind11 is REQUIRED, we will ignore the error here for now.
QUIET
# REQUIRED
TARGETS
pybind11_headers pybind11::headers
pybind11_embed pybind11::embed
)

list(
APPEND pluginplay_depends
pybind11::headers pybind11::embed Python::Python
pybind11_headers pybind11_embed python
)
endif()

Expand Down