2019-04-28 15:57:41 +00:00
|
|
|
add_definitions(-DUNIX)
|
|
|
|
add_definitions(-DPOSIX)
|
2019-04-29 23:48:43 +00:00
|
|
|
|
2019-04-28 15:57:41 +00:00
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
2019-04-29 23:48:43 +00:00
|
|
|
get_filename_component(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-linux.c ABSOLUTE)
|
|
|
|
get_filename_component(EV_SRC "llarp/ev/ev_epoll.cpp" ABSOLUTE)
|
2019-04-28 15:57:41 +00:00
|
|
|
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android")
|
2019-04-29 23:48:43 +00:00
|
|
|
get_filename_component(LIBTUNTAP_IMPL ${TT_ROOT}/tuntap-unix-linux.c ABSOLUTE)
|
|
|
|
get_filename_component(EV_SRC "llarp/ev/ev_epoll.cpp" ABSOLUTE)
|
2019-04-28 15:57:41 +00:00
|
|
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
2019-04-29 23:48:43 +00:00
|
|
|
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)
|
2019-04-28 15:57:41 +00:00
|
|
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
2019-04-29 23:48:43 +00:00
|
|
|
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)
|
2019-04-28 15:57:41 +00:00
|
|
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
|
2019-04-29 23:48:43 +00:00
|
|
|
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)
|
2019-04-28 15:57:41 +00:00
|
|
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
2019-04-29 23:48:43 +00:00
|
|
|
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)
|
2019-04-28 15:57:41 +00:00
|
|
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
2019-04-29 23:48:43 +00:00
|
|
|
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()
|
2019-04-28 15:57:41 +00:00
|
|
|
else()
|
2019-04-29 23:48:43 +00:00
|
|
|
message(FATAL_ERROR "Your operating system is not supported yet")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(EXE_LIBS ${STATIC_LIB} cppbackport libutp)
|
|
|
|
|
|
|
|
if(RELEASE_MOTTO)
|
|
|
|
add_definitions(-DLLARP_RELEASE_MOTTO="${RELEASE_MOTTO}")
|
2019-04-28 15:57:41 +00:00
|
|
|
endif()
|