Add User-level metrics
[sim/e2-interface.git] / e2sim / e2apv1sim / CMakeLists.txt
1 #/*****************************************************************************
2 #                                                                            *
3 # Copyright 2019 AT&T Intellectual Property                                  *
4 # Copyright 2019 Nokia                                                       *
5 #                                                                            *
6 # Licensed under the Apache License, Version 2.0 (the "License");            *
7 # you may not use this file except in compliance with the License.           *
8 # You may obtain a copy of the License at                                    *
9 #                                                                            *
10 #      http://www.apache.org/licenses/LICENSE-2.0                            *
11 #                                                                            *
12 # Unless required by applicable law or agreed to in writing, software        *
13 # distributed under the License is distributed on an "AS IS" BASIS,          *
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
15 # See the License for the specific language governing permissions and        *
16 # limitations under the License.                                             *
17 #                                                                            *
18 #******************************************************************************/
19
20 cmake_minimum_required(VERSION 3.5.1)
21 set(CMAKE_CXX_COMPILER "/usr/bin/g++")
22 set(CMAKE_CXX_STANDARD 14)
23
24
25
26 project(e2sim)
27
28 set (E2SIM_ROOT ./)
29
30
31 include_directories("${E2SIM_ROOT}")
32 include_directories("${E2SIM_ROOT}/src")
33 include_directories("${E2SIM_ROOT}/src/DEF")
34 include_directories("${E2SIM_ROOT}/src/SCTP/")
35 include_directories("${E2SIM_ROOT}/src/E2AP")
36 include_directories("${E2SIM_ROOT}/src/E2AP/E2SM")
37 include_directories("${E2SIM_ROOT}/ASN1c")
38
39
40 #set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
41 set(THREADS_PREFER_PTHREAD_FLAG ON)
42
43 find_library( SCTP_STD_LIB sctp )  #needed for sctp_sendmsgf
44 find_package( Threads REQUIRED )
45
46 #----------------------------------------------
47 file(GLOB E2SIM_SOURCES
48   "${E2SIM_ROOT}/e2sim.cpp"
49   "${E2SIM_ROOT}/encode_kpm.cpp"
50   "${E2SIM_ROOT}/kpm_callbacks.cpp"
51   "${E2SIM_ROOT}/encode_e2apv1.cpp" 
52   "${E2SIM_ROOT}/src/DEF/*.cpp"
53   "${E2SIM_ROOT}/src/SCTP/*.cpp"
54   "${E2SIM_ROOT}/src/E2AP/*.c"
55   "${E2SIM_ROOT}/src/E2AP/*.cpp"
56   "${E2SIM_ROOT}/ASN1c/*.c"
57
58   )
59
60 add_executable(e2sim ${E2SIM_SOURCES})
61 target_link_libraries( e2sim ${SCTP_STD_LIB} )
62 target_link_libraries( e2sim Threads::Threads )
63
64 #----------------------------------------------
65 file(GLOB RICSIM_SOURCES
66
67   "${E2SIM_ROOT}/ricsim.cpp"
68   "${E2SIM_ROOT}/encode_kpm.cpp"
69   "${E2SIM_ROOT}/encode_e2apv1.cpp"
70   "${E2SIM_ROOT}/kpm_callbacks.cpp"
71   "${E2SIM_ROOT}/src/DEF/*.cpp"
72   "${E2SIM_ROOT}/src/SCTP/*.cpp"
73   "${E2SIM_ROOT}/src/E2AP/*.c"
74   "${E2SIM_ROOT}/src/E2AP/*.cpp"
75   "${E2SIM_ROOT}/ASN1c/*.c"
76   )
77 add_executable(ricsim ${RICSIM_SOURCES})
78 target_link_libraries( ricsim ${SCTP_STD_LIB}  )
79 target_link_libraries( e2sim Threads::Threads )