forked from ecmwf/ecbuild
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
55 lines (40 loc) · 1.7 KB
/
CMakeLists.txt
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
53
54
55
# (C) Copyright 2011- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
############################################################################################
# cmake options:
#
# -DCMAKE_INSTALL_PREFIX=/path/to/install
cmake_minimum_required( VERSION 2.8.4 FATAL_ERROR )
project( ecbuild C )
set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH} )
include( ecbuild_system )
###############################################################################
# local project
ecbuild_declare_project()
configure_file( cmake/ecbuild_version.h.in ${CMAKE_BINARY_DIR}/ecbuild_version.h )
ecbuild_add_option( FEATURE INSTALL
DEFAULT OFF
DESCRIPTION "Whether to install ecbuild files" )
# contents
ecbuild_add_resources( TARGET ${PROJECT_NAME}_description_files
SOURCES_PACK
INSTALL
AUTHORS
NOTICE
LICENSE
COPYING
)
add_subdirectory( bin )
add_subdirectory( share )
add_subdirectory( cmake )
add_subdirectory( doc )
install( DIRECTORY cmake DESTINATION ${INSTALL_DATA_DIR} PATTERN "CMakeLists.txt" EXCLUDE )
############################################################################################
# finalize
ecbuild_install_project( NAME ${PROJECT_NAME} )
ecbuild_print_summary()