60 lines
1.4 KiB
CMake
60 lines
1.4 KiB
CMake
cmake_minimum_required(VERSION 2.6)
|
|
project(donar)
|
|
|
|
list(APPEND CSOURCES
|
|
src/net_tools.h
|
|
src/net_tools.c
|
|
src/socks5.h
|
|
src/socks5.c
|
|
src/tor_os.h
|
|
src/tor_os.c
|
|
src/tor_ctl.h
|
|
src/tor_ctl.c
|
|
src/donar_client.h
|
|
src/donar_client.c
|
|
src/donar_server.h
|
|
src/donar_server.c
|
|
src/evt_core.h
|
|
src/evt_core.c
|
|
src/algo_naive.c
|
|
src/utils.h
|
|
src/utils.c
|
|
src/packet.h
|
|
src/packet.c
|
|
src/url.h
|
|
src/url.c
|
|
src/donar_init.h
|
|
src/donar_init.c
|
|
src/algo_rr.c
|
|
src/algo_dup2.c
|
|
src/algo_utils.h
|
|
src/algo_utils.c
|
|
src/proxy.h
|
|
src/proxy.c
|
|
src/timer.h
|
|
src/timer.c
|
|
)
|
|
|
|
add_executable(donar ${CSOURCES} src/donar.c)
|
|
add_executable(measlat ${CSOURCES} src/meas_lat.c)
|
|
add_executable(udpecho ${CSOURCES} src/udp_echo.c)
|
|
add_executable(torecho ${CSOURCES} src/tor_echo.c)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
pkg_search_module(GLIB REQUIRED glib-2.0)
|
|
|
|
target_include_directories(donar PRIVATE ${GLIB_INCLUDE_DIRS})
|
|
target_link_libraries(donar ${GLIB_LDFLAGS})
|
|
|
|
target_include_directories(measlat PRIVATE ${GLIB_INCLUDE_DIRS})
|
|
target_link_libraries(measlat ${GLIB_LDFLAGS})
|
|
|
|
target_include_directories(udpecho PRIVATE ${GLIB_INCLUDE_DIRS})
|
|
target_link_libraries(udpecho ${GLIB_LDFLAGS})
|
|
|
|
target_include_directories(torecho PRIVATE ${GLIB_INCLUDE_DIRS})
|
|
target_link_libraries(torecho ${GLIB_LDFLAGS})
|
|
|
|
install(TARGETS donar measlat udpecho torecho
|
|
RUNTIME DESTINATION bin
|
|
LIBRARY DESTINATION lib)
|