blob: c9d0be31c6f265ff0b90db056f0ef1863a4ef0b0 [file] [log] [blame]
ss412g1a79bdf2019-10-24 12:03:05 +03001# Copyright 2019 AT&T Intellectual Property
2# Copyright 2019 Nokia
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
nm755n2e268142019-11-28 16:40:23 +000016# This source code is part of the near-RT RIC (RAN Intelligent Controller)
17# platform project (RICP).
18
ss412g1a79bdf2019-10-24 12:03:05 +030019cmake_minimum_required(VERSION 3.13)
20project(e2)
21
22set(CMAKE_VERBOSE_MAKEFILE on)
23
24set(CMAKE_CXX_STANDARD 17)
25
26set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEV_PKG=1")
27
28#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DASN_DISABLE_OER_SUPPORT -DASN_PDU_COLLECTION -L. -LRIC-E2-TERMINATION/tracelibcpp/build -ggdb3 -Wall -W -Wpedantic")
29set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DASN_DISABLE_OER_SUPPORT -DASN_PDU_COLLECTION -L. -LRIC-E2-TERMINATION/base64/lib -O3 -Wall -Wpedantic")
30#only c code with -O3
31set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DASN_DISABLE_OER_SUPPORT -DASN_PDU_COLLECTION -L. -LRIC-E2-TERMINATION/base64/lib -O3 -Wall -W -Wpedantic")
32
33include_directories(RIC-E2-TERMINATION)
ss412g84c60042019-11-13 01:08:04 +020034include_directories(RIC-E2-TERMINATION/3rdparty/asn1cFiles)
ss412g1a79bdf2019-10-24 12:03:05 +030035
ss412g84c60042019-11-13 01:08:04 +020036file(GLOB ASN_MODULE_SRCS "RIC-E2-TERMINATION/3rdparty/asn1cFiles/*.c")
37file(GLOB ASN_MODULE_HDRS "RIC-E2-TERMINATION/3rdparty/asn1cFiles/*.h")
ss412g1a79bdf2019-10-24 12:03:05 +030038
39add_library(asn1codec ${ASN_MODULE_SRCS} ${ASN_MODULE_HDRS})
40
41install(TARGETS asn1codec DESTINATION /usr/lib)
42install(FILES ${ASN_MODULE_HDRS} DESTINATION /usr/include/asn1c)
43
44
45#include_directories(RIC-E2-TERMINATION/TEST/asn1c)
46#
47#file(GLOB ASNE2SMC "RIC-E2-TERMINATION/TEST/asn1c/*.c")
48#file(GLOB ASNE2SMH "RIC-E2-TERMINATION/TEST/asn1c/*.h")
49#RIC-E2-TERMINATION/
50#add_library(asne2smcodec ${ASNE2SMC})
51
52
53include_directories(RIC-E2-TERMINATION/TEST)
54include_directories(RIC-E2-TERMINATION/TEST/e2smTest)
55include_directories(RIC-E2-TERMINATION/TEST/T1)
56include_directories(RIC-E2-TERMINATION/TEST/T2)
57include_directories(RIC-E2-TERMINATION/base64/include)
58include_directories(RIC-E2-TERMINATION/base64/lib)
59
60add_library(e2sm
61 RIC-E2-TERMINATION/TEST/e2sm.c
62 RIC-E2-TERMINATION/TEST/e2sm.h
63 ${ASN_MODULE_HDRS})
64add_definitions(-DBOOST_LOG_DYN_LINK)
65
66link_libraries(nsl sctp c m dl mdclog rmr_nng nng e2sm asn1codec boost_system boost_log_setup boost_log boost_date_time boost_thread rt boost_filesystem pthread)
67
68add_executable(e2 RIC-E2-TERMINATION/sctpThread.cpp
69 RIC-E2-TERMINATION/sctpThread.h
70 RIC-E2-TERMINATION/openTracing.h
71 RIC-E2-TERMINATION/mapWrapper.h
72 RIC-E2-TERMINATION/base64.h
73 RIC-E2-TERMINATION/base64.cpp
74 )
75
76add_executable(e2smtest
77 RIC-E2-TERMINATION/TEST/e2smTest/e2smtest.cpp)