RIC-641 Fixing client/server model definitions and adding client and server API
[ric-plt/xapp-frame-cpp.git] / src / model / CMakeLists.txt
1 # ==================================================================================
2 # Copyright (c) 2020 HCL Technologies Limited.
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 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
17 set(CMAKE_CXX_STANDARD 17)
18 # BUILD TYPE
19 message("A ${CMAKE_BUILD_TYPE} build configuration is detected")
20 message("CPP flag is  ${CMAKE_CXX_FLAGS} ")
21 message("CPP standard is  ${CMAKE_CXX_STANDARD} ")
22
23 include_directories( "${srcd}/src/model")
24 #SOURCE FILES
25 file(GLOB SOURCE_FILES  "${srcd}/src/model/*.cpp" )
26
27
28 add_library(model_objects OBJECT  ${SOURCE_FILES})
29
30 target_include_directories (model_objects PUBLIC
31         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
32         $<INSTALL_INTERFACE:include>
33         PRIVATE src)
34
35 # header files should go into .../include/xfcpp/
36
37 file(GLOB SOURCE_INSTALL_FILES  "${srcd}/src/model/*.h")
38 #set( install_inc_client "include/ricxfcpp/rest-client" )
39
40 if( DEV_PKG )
41         install( FILES
42                  ${SOURCE_INSTALL_FILES}
43                 DESTINATION ${install_inc}
44         )
45 endif()
46
47