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

Fix cmake #12

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
# OpenMM XTB Plugin
#----------------------------------------------------

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.7.1)

# We need to know where OpenMM is installed so we can access the headers and libraries.
SET(OPENMM_DIR "/usr/local/openmm" CACHE PATH "Where OpenMM is installed")
INCLUDE_DIRECTORIES("${OPENMM_DIR}/include")
LINK_DIRECTORIES("${OPENMM_DIR}/lib" "${OPENMM_DIR}/lib/plugins")

# We also need to know where XTB is installed.
FIND_LIBRARY(XTB_LIBRARY_PATH xtb)
FIND_FILE(XTB_HEADER_PATH xtb.h)
CMAKE_PATH(GET XTB_LIBRARY_PATH PARENT_PATH XTB_LIBRARY_DIR)
CMAKE_PATH(GET XTB_HEADER_PATH PARENT_PATH XTB_INCLUDE_DIR)
INCLUDE_DIRECTORIES("${XTB_INCLUDE_DIR}")
LINK_DIRECTORIES("${XTB_LIBRARY_DIR}")
CMAKE_PATH(GET XTB_HEADER_PATH PARENT_PATH XTB_INCLUDE_DIR_DEFAULT)
SET(XTB_INCLUDE_DIR CACHE PATH XTB_INCLUDE_DIR_DEFAULT)

FIND_LIBRARY(XTB_LIBRARY_PATH xtb)
CMAKE_PATH(GET XTB_LIBRARY_PATH PARENT_PATH XTB_LIBRARY_DIR_DEFAULT)
SET(XTB_LIBRARY_DIR CACHE PATH XTB_LIBRARY_DIR_DEFAULT)

# Specify the C++ version we are building for.
SET (CMAKE_CXX_STANDARD 11)
Expand Down