-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
23 lines (20 loc) · 935 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
cmake_minimum_required(VERSION 3.10)
project(StopWait)
SET(CMAKE_C_COMPTLER GCC)
set(CMAKE_CXX FLAGS -fexec-charset=GBK)
add_definitions(-std=c++11)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/StopWait SRC_LIST_WAITSTOP)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/GBN SRC_LIST_GBN)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/SR SRC_LIST_SR)
aux_source_directory(${PROJECT_SOURCE_DIR}/src/TCP SRC_LIST_TCP)
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
ADD_EXECUTABLE(stop_wait ${SRC_LIST_WAITSTOP})
ADD_EXECUTABLE(gbn ${SRC_LIST_GBN})
ADD_EXECUTABLE(sr ${SRC_LIST_SR})
ADD_EXECUTABLE(tcp ${SRC_LIST_TCP})
FIND_LIBRARY(NETSIM_LIB libnetsim.a ${PROJECT_SOURCE_DIR}/lib)
TARGET_LINK_LIBRARIES(stop_wait ${NETSIM_LIB})
TARGET_LINK_LIBRARIES(gbn ${NETSIM_LIB})
TARGET_LINK_LIBRARIES(sr ${NETSIM_LIB})
TARGET_LINK_LIBRARIES(tcp ${NETSIM_LIB})