forked from qcscine/xtb_wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
52 lines (44 loc) · 1.27 KB
/
CMakeLists.txt
File metadata and controls
52 lines (44 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.9)
# Setup the Scine Xtb Project
project(Xtb
VERSION 1.0.0
DESCRIPTION "SCINE XTB Wrapper."
)
# Missing modeled dependencies of xtb
enable_language(Fortran)
# Set the module path for universal cmake files inclusion
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/dev/cmake)
# Find xtb
find_package(xtb QUIET)
if(NOT TARGET lib-xtb-static)
include(DownloadProject)
download_project(
PROJ xtb
GIT_REPOSITORY https://github.com/grimme-lab/xtb.git
GIT_TAG v6.4.1
QUIET
UPDATE_DISCONNECTED 1
)
add_subdirectory(${xtb_SOURCE_DIR} ${xtb_BINARY_DIR})
if(TARGET lib-xtb-static)
message(STATUS "xtb was not found in your PATH, so it was downloaded.")
else()
string(CONCAT error_msg
"xtb was not found in your PATH and could not be established through "
"a download. Try specifying xtb_DIR or altering CMAKE_PREFIX_PATH to "
"point to a candidate xtb installation base directory."
)
message(FATAL_ERROR ${error_msg})
endif()
endif()
# Component setup
include(ComponentSetup)
scine_setup_component()
# Enable testing
if(SCINE_BUILD_TESTS)
enable_testing()
endif()
# Subdirectories
add_subdirectory(src)
# Documentation
scine_component_documentation(UtilsOSDocumentation)