File tree Expand file tree Collapse file tree 4 files changed +54
-2
lines changed
Expand file tree Collapse file tree 4 files changed +54
-2
lines changed Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.5)
2+
3+ project (libdftd3 VERSION 0.9.2 LANGUAGES Fortran)
4+
5+ option (BUILD_SHARED_LIBS "Whether the library should be a shared one" FALSE )
6+
7+ option (INSTALL_INCLUDE_FILES "Whether include / module files should be installed" TRUE )
8+
9+ set (INSTALL_MODDIR "dftd3/modfiles" CACHE PATH
10+ "Installation directory for Fortran module files (within standard include folder)" )
11+
12+ add_subdirectory (lib)
13+ if (NOT LIBRARY_ONLY)
14+ add_subdirectory (prg)
15+ endif ()
Original file line number Diff line number Diff line change 33=====
44
55This is a repackaged version of the `DFTD3 program
6- <https ://www.chemie .uni-bonn.de/pctc/mulliken-center/software/dft-d3/get-the-current-version-of-dft-d3 > `_
6+ <http ://www.thch .uni-bonn.de/tc/index.php?section=downloads&subsection=getd3 > `_
77by S. Grimme and his coworkers.
88
99The original program (V3.1 Rev 1) was downloaded at 2016-04-03. It has been
@@ -21,7 +21,6 @@ split into two parts:
2121 versions of Sherrill and coworkers (-bjm and -zerom)
2222 (Functionality corresponds to V3.2 Rev0)
2323
24-
2524Compilation
2625===========
2726
Original file line number Diff line number Diff line change 1+ set (sources
2+ api.f90
3+ common.f90
4+ core.f90
5+ pars.f90
6+ sizes.f90)
7+
8+ add_library (dftd3 ${sources} )
9+
10+ set (includedir ${CMAKE_CURRENT_BINARY_DIR} /include )
11+
12+ set_target_properties (dftd3 PROPERTIES Fortran_MODULE_DIRECTORY ${includedir} )
13+
14+ target_include_directories (dftd3 PUBLIC
15+ $<BUILD_INTERFACE:${includedir} >
16+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} /${INSTALL_MODDIR} >)
17+
18+ install (TARGETS dftd3
19+ EXPORT ${INSTALL_EXPORT_NAME}
20+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
21+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
22+
23+ if (INSTALL_INCLUDE_FILES)
24+ install (DIRECTORY ${includedir} / DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /${INSTALL_MODDIR} )
25+ endif ()
26+
Original file line number Diff line number Diff line change 1+ set (sources
2+ extras.f90
3+ main.f90)
4+
5+ add_executable (dftd3_standalone ${sources} )
6+
7+ target_link_libraries (dftd3_standalone dftd3)
8+
9+ set_target_properties (dftd3_standalone PROPERTIES OUTPUT_NAME "dftd3" )
10+
11+ install (TARGETS dftd3_standalone
12+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
You can’t perform that action at this time.
0 commit comments