-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
43 lines (29 loc) · 954 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
project(tNETencule)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAME_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/Modules/)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
set(${CMAKE_SYSTEM_NAME} True)
find_package(Event COMPONENTS core REQUIRED)
find_package(Tapcfg REQUIRED)
set(SOURCES_LIST hub.c tun.c
main.c)
if (MSVC)
set(SOURCES_LIST ${SOURCES_LIST} wingetopt.c winerr.c)
endif(MSVC)
if (UNIX)
include_directories(/usr/include/ /usr/local/include)
endif (UNIX)
include_directories(${TAPCFG_INCLUDE_DIR}
${EVENT_INCLUDE_DIR})
add_definitions(-D${CMAKE_SYSTEM_NAME})
add_executable(tNET
${SOURCES_LIST})
target_link_libraries(tNET
${EVENT_LIBRARIES})
if (MSVC)
target_link_libraries(tNET ws2_32)
endif(MSVC)
target_link_libraries(tNET
${TAPCFG_LIBRARIES})