ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 1 | # 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 | |
nm755n | 2e26814 | 2019-11-28 16:40:23 +0000 | [diff] [blame^] | 16 | # This source code is part of the near-RT RIC (RAN Intelligent Controller) |
| 17 | # platform project (RICP). |
| 18 | |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 19 | cmake_minimum_required(VERSION 3.13) |
| 20 | project(e2) |
| 21 | |
| 22 | set(CMAKE_VERBOSE_MAKEFILE on) |
| 23 | |
| 24 | set(CMAKE_CXX_STANDARD 17) |
| 25 | |
| 26 | set(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") |
| 29 | set(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 |
| 31 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DASN_DISABLE_OER_SUPPORT -DASN_PDU_COLLECTION -L. -LRIC-E2-TERMINATION/base64/lib -O3 -Wall -W -Wpedantic") |
| 32 | |
| 33 | include_directories(RIC-E2-TERMINATION) |
ss412g | 84c6004 | 2019-11-13 01:08:04 +0200 | [diff] [blame] | 34 | include_directories(RIC-E2-TERMINATION/3rdparty/asn1cFiles) |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 35 | |
ss412g | 84c6004 | 2019-11-13 01:08:04 +0200 | [diff] [blame] | 36 | file(GLOB ASN_MODULE_SRCS "RIC-E2-TERMINATION/3rdparty/asn1cFiles/*.c") |
| 37 | file(GLOB ASN_MODULE_HDRS "RIC-E2-TERMINATION/3rdparty/asn1cFiles/*.h") |
ss412g | 1a79bdf | 2019-10-24 12:03:05 +0300 | [diff] [blame] | 38 | |
| 39 | add_library(asn1codec ${ASN_MODULE_SRCS} ${ASN_MODULE_HDRS}) |
| 40 | |
| 41 | install(TARGETS asn1codec DESTINATION /usr/lib) |
| 42 | install(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 | |
| 53 | include_directories(RIC-E2-TERMINATION/TEST) |
| 54 | include_directories(RIC-E2-TERMINATION/TEST/e2smTest) |
| 55 | include_directories(RIC-E2-TERMINATION/TEST/T1) |
| 56 | include_directories(RIC-E2-TERMINATION/TEST/T2) |
| 57 | include_directories(RIC-E2-TERMINATION/base64/include) |
| 58 | include_directories(RIC-E2-TERMINATION/base64/lib) |
| 59 | |
| 60 | add_library(e2sm |
| 61 | RIC-E2-TERMINATION/TEST/e2sm.c |
| 62 | RIC-E2-TERMINATION/TEST/e2sm.h |
| 63 | ${ASN_MODULE_HDRS}) |
| 64 | add_definitions(-DBOOST_LOG_DYN_LINK) |
| 65 | |
| 66 | link_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 | |
| 68 | add_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 | |
| 76 | add_executable(e2smtest |
| 77 | RIC-E2-TERMINATION/TEST/e2smTest/e2smtest.cpp) |