Use proper doxygen tags in modular simulator
[gromacs.git] / api / gmxapi.cmake
blobfde34647412a83521b011373f06a965ef6328884
2 # This file is part of the GROMACS molecular simulation package.
4 # Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
5 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
6 # and including many others, as listed in the AUTHORS file in the
7 # top-level source directory and at http://www.gromacs.org.
9 # GROMACS is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public License
11 # as published by the Free Software Foundation; either version 2.1
12 # of the License, or (at your option) any later version.
14 # GROMACS is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # Lesser General Public License for more details.
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with GROMACS; if not, see
21 # http://www.gnu.org/licenses, or write to the Free Software Foundation,
22 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
24 # If you want to redistribute modifications to GROMACS, please
25 # consider that scientific software is very special. Version
26 # control is crucial - bugs must be traceable. We will be happy to
27 # consider code for inclusion in the official distribution, but
28 # derived work must not be called official GROMACS. Details are found
29 # in the README & COPYING files - if they are missing, get the
30 # official version at http://www.gromacs.org.
32 # To help us fund GROMACS development, we humbly ask that you cite
33 # the research papers on the package. Check out http://www.gromacs.org.
35 # This list file provides the Gromacs::gmxapi cmake module.
37 ##########################
38 # Set up public interface.
40 # Note: GROMACS releases have a single-integer monotonic version in GMX_API_VERSION
41 # and LIBRARY_VERSION annotates the shared object for libgromacs. GMXAPI versioning
42 # is not synchronized to releases and may increment faster or slower.
44 # Prior to 0.1, GMXAPI patch levels are used to mark short term development cycles
45 # and allow compatibility checks for client software of the early releases.
47 # gmxapi 0.2 will be the first release candidate for gmxapi 1.0 and will attempt
48 # to establish compatibility guarantees consistent with semantic versioning.
49 # (https://semver.org). When the API is deemed suitably stable, gmxapi 1.0 should
50 # be tagged. Official GROMACS releases should be mappable to a distinct gmxapi
51 # release string. For roadmap details, see https://gitlab.com/gromacs/gromacs/-/issues/2585
52 set(GMXAPI_MAJOR 0)
53 set(GMXAPI_MINOR 1)
54 set(GMXAPI_PATCH 0)
55 set(GMXAPI_RELEASE ${GMXAPI_MAJOR}.${GMXAPI_MINOR}.${GMXAPI_PATCH})
57 add_library(gmxapi)
58 set_target_properties(gmxapi PROPERTIES
59                       VERSION_MAJOR ${GMXAPI_MAJOR}
60                       VERSION_MINOR ${GMXAPI_MINOR}
61                       VERSION_PATCH ${GMXAPI_PATCH}
62                       RELEASE ${GMXAPI_RELEASE})
64 ##########################
65 # Define public interface.
67 # The include directory should be mostly empty so that we can use it internally as
68 # the public interface include directory during build and testing.
69 configure_file(include/gmxapiversion.h.in include/gmxapi/version.h)
70 target_include_directories(gmxapi PUBLIC
71                            $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
72                            $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
73                            $<INSTALL_INTERFACE:include>
74                            )
76 add_subdirectory(cpp/gmxapi)
78 ###############################
79 # Install the public interface.
81 # If any item begins in a generator expression it must evaluate to a full path,
82 # so we can't just use something like $<TARGET_PROPERTIES:gmxapiPublicHeaders,SOURCES>.
83 # Instead, we use a canonical list defined in the parent scope.
85 # Install public header directories.
86 install(DIRECTORY include/gmxapi
87         DESTINATION include)
89 # Install "configured" files from the build tree.
90 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/gmxapi/version.h
91         DESTINATION include/gmxapi)