mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-10-31 09:20:21 +00:00
31 lines
1.6 KiB
CMake
31 lines
1.6 KiB
CMake
|
add_definitions(-DUNIX)
|
||
|
add_definitions(-DPOSIX)
|
||
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||
|
get_filename_component(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-linux.c ABSOLUTE)
|
||
|
get_filename_component(EV_SRC "llarp/ev/ev_epoll.cpp" ABSOLUTE)
|
||
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android")
|
||
|
get_filename_component(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-linux.c ABSOLUTE)
|
||
|
get_filename_component(EV_SRC "llarp/ev/ev_epoll.cpp" ABSOLUTE)
|
||
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||
|
set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-openbsd.c ${TT_ROOT}/tuntap-unix-bsd.c)
|
||
|
get_filename_component(EV_SRC "llarp/ev/ev_kqueue.cpp" ABSOLUTE)
|
||
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
||
|
set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-netbsd.c ${TT_ROOT}/tuntap-unix-bsd.c)
|
||
|
get_filename_component(EV_SRC "llarp/ev/ev_kqueue.cpp" ABSOLUTE)
|
||
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
|
||
|
set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-freebsd.c ${TT_ROOT}/tuntap-unix-bsd.c)
|
||
|
get_filename_component(EV_SRC "llarp/ev/ev_kqueue.cpp" ABSOLUTE)
|
||
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||
|
set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-darwin.c ${TT_ROOT}/tuntap-unix-bsd.c)
|
||
|
get_filename_component(EV_SRC "llarp/ev/ev_kqueue.cpp" ABSOLUTE)
|
||
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
||
|
set(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-sunos.c)
|
||
|
if (SOLARIS_HAVE_EPOLL)
|
||
|
get_filename_component(EV_SRC "llarp/ev/ev_epoll.cpp" ABSOLUTE)
|
||
|
else()
|
||
|
get_filename_component(EV_SRC "llarp/ev/ev_sun.cpp" ABSOLUTE)
|
||
|
endif()
|
||
|
else()
|
||
|
message(FATAL_ERROR "Your operating system is not supported yet")
|
||
|
endif()
|