blob: 099f51873b144ef8190400ddb16b6e75b2c654ae [file] [log] [blame]
Jeremy Mordkoff6f07e6f2016-09-07 18:56:51 -04001#
2# Copyright 2016 RIFT.IO Inc
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16# Author(s): Anil Gunturu
17# Creation Date: 03/26/2014
18#
19
20##
21# DEPENDENCY ALERT
22# The submodule dependencies must be specified in the
23# .gitmodules.dep file at the top level (supermodule) directory
24# If this submodule depends other submodules remember to update
25# the .gitmodules.dep
26##
27
28cmake_minimum_required(VERSION 2.8)
29
30message(CMAKE_MODULE_PATH=${CMAKE_MODULE_PATH})
31
32##
33# DO NOT add any code before this and DO NOT
34# include this file anywhere else
35##
Jeremy Mordkoff4870d0e2017-09-30 20:28:33 -040036include(rift_submodule NO_POLICY_SCOPE)
Jeremy Mordkoff6f07e6f2016-09-07 18:56:51 -040037include(rift_python)
38
39##
40# Submodule specific includes will go here,
41# These are specified here, since these variables are accessed
42# from multiple sub directories. If the variable is subdirectory
43# specific it must be declared in the subdirectory.
44##
45
Jeremy Mordkoff4870d0e2017-09-30 20:28:33 -040046# Default package
47set(INSTALL_COMPONENT mano)
48
49option(PRODUCT "Control the details of the build" OSM)
50
51if (PRODUCT STREQUAL "RIFTWARE")
52set(INCLUDE_EXAMPLES ON)
53else()
54set(INCLUDE_EXAMPLES OFF)
55endif()
56
Jeremy Mordkoff6f07e6f2016-09-07 18:56:51 -040057##
58# Include the subdirs
59##
60set(subdirs
61 common
Jeremy Mordkoff6f07e6f2016-09-07 18:56:51 -040062 models
63 rwcal
64 rwmon
65 rwcm
66 rwlaunchpad
Jeremy Mordkoff4870d0e2017-09-30 20:28:33 -040067 rwprojectmano
Jeremy Mordkoff6f07e6f2016-09-07 18:56:51 -040068 )
69
70if (NOT RIFT_AGENT_BUILD STREQUAL "XML_ONLY")
71 list(APPEND subdirs confd_client)
72endif()
73
Jeremy Mordkoff4870d0e2017-09-30 20:28:33 -040074if (INCLUDE_EXAMPLES)
75 message("Including examples")
76 list(APPEND subdirs examples)
77else()
78 message("NOT including examples")
79endif()
80
Jeremy Mordkoff6f07e6f2016-09-07 18:56:51 -040081rift_add_subdirs(SUBDIR_LIST ${subdirs})
82
Jeremy Mordkoff4870d0e2017-09-30 20:28:33 -040083install(FILES BUILD.sh DESTINATION bin COMPONENT installer)
84
85##
86# Set up package details
87##
88
89rift_set_component_package_fields(
90 "mano"
91 DESCRIPTION "RIFT.ware MANO"
92 )
93
94rift_set_component_package_fields(
95 "rwcal-plugin-aws"
96 DESCRIPTION "RIFT.ware AWS plugin"
97 )
98
99rift_set_component_package_fields(
100 "rwcal-plugin-cloudsim"
101 DESCRIPTION "RIFT.ware cloudsim plugin"
102 )
103
104rift_set_component_package_fields(
105 "rwcal-plugin-cloudsimproxy"
106 DESCRIPTION "RIFT.ware cloudsimproxy plugin"
107 )
108
109rift_set_component_package_fields(
110 "rwcal-plugin-openmano-vimconnector"
111 DESCRIPTION "RIFT.ware vimconnector plugin"
112 )
113
114rift_set_component_package_fields(
115 "rwcal-plugin-openstack"
116 DESCRIPTION "RIFT.ware openstack plugin"
117 )
118
119rift_set_component_package_fields(
120 "rwcal-plugin-brocade"
121 DESCRIPTION "RIFT.ware brocade plugin"
122 )
123
124rift_set_component_package_fields(
125 "rwcal-plugin-mock"
126 DESCRIPTION "RIFT.ware mock plugin"
127 )
128
Jeremy Mordkoff6f07e6f2016-09-07 18:56:51 -0400129##
130# This macro adds targets for documentaion, unittests, code coverage and packaging
131##
132rift_add_submodule_targets(SUBMODULE_PACKAGE_NAME "rw.core.mano")
133
134# Workaround whatever mess rw.package is doing as it can't seem
135# to figure out that it should make a directory -before- making
136# symlinks..
137set(dir usr/lib64/python${RIFT_PYTHON3}/site-packages/gi/overrides)
138install(FILES
139 ${CMAKE_CURRENT_SOURCE_DIR}/.cpack-workaround
140 DESTINATION ${dir})
141
142if (RIFT_SUPPORT_PYTHON2)
143 set(dir usr/lib64/python${RIFT_PYTHON2}/site-packages/gi/overrides)
144
145 install(FILES
146 ${CMAKE_CURRENT_SOURCE_DIR}/.cpack-workaround
147 DESTINATION ${dir})
148endif()