Remove FS_LIB conditionals

pull/961/head
Stephen Shelton 5 years ago
parent 5ce260fce1
commit 332f33b049

@ -249,7 +249,7 @@ if(ANDROID)
set(ANDROID_PLATFORM_SRC android/ifaddrs.c)
endif(ANDROID)
set(LIBS ${MALLOC_LIB} ${FS_LIB} ${LIBUV_LIBRARY} ${SD_LIBS})
set(LIBS ${MALLOC_LIB} ${LIBUV_LIBRARY} ${SD_LIBS})
if(TRACY_ROOT)
list(APPEND LIBS -ldl)
endif()

@ -30,20 +30,16 @@ if(EMBEDDED_CFG OR ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(FS_LIB stdc++fs)
list(APPEND LIBTUNTAP_SRC ${TT_ROOT}/tuntap-unix-linux.c)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android")
find_library(FS_LIB NAMES c++fs c++experimental stdc++fs)
list(APPEND LIBTUNTAP_SRC ${TT_ROOT}/tuntap-unix-linux.c)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
list(APPEND LIBTUNTAP_SRC ${TT_ROOT}/tuntap-unix-openbsd.c ${TT_ROOT}/tuntap-unix-bsd.c)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
list(APPEND LIBTUNTAP_SRC ${TT_ROOT}/tuntap-unix-netbsd.c ${TT_ROOT}/tuntap-unix-bsd.c)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
find_library(FS_LIB NAMES c++experimental)
list(APPEND LIBTUNTAP_SRC ${TT_ROOT}/tuntap-unix-freebsd.c ${TT_ROOT}/tuntap-unix-bsd.c)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "iOS")
find_library(FS_LIB NAMES c++fs c++experimental stdc++fs)
list(APPEND LIBTUNTAP_SRC ${TT_ROOT}/tuntap-unix-darwin.c ${TT_ROOT}/tuntap-unix-bsd.c)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
list(APPEND LIBTUNTAP_SRC ${TT_ROOT}/tuntap-unix-sunos.c)

@ -22,9 +22,6 @@ if(NOT MSVC_VERSION)
add_compile_options(-fno-ident -Wa,-mbig-obj)
link_libraries( -lws2_32 -liphlpapi -lshlwapi -ldbghelp )
add_definitions(-DWINVER=0x0500 -D_WIN32_WINNT=0x0500)
# Wait a minute, if we're not Microsoft C++, nor a Clang paired with Microsoft C++,
# then the only possible option has to be GNU or a GNU-linked Clang!
set(FS_LIB stdc++fs)
endif()
if(EMBEDDED_CFG)
@ -34,7 +31,7 @@ endif()
list(APPEND LIBTUNTAP_SRC ${TT_ROOT}/tuntap-windows.c)
get_filename_component(EV_SRC "llarp/ev/ev_libuv.cpp" ABSOLUTE)
add_definitions(-DWIN32_LEAN_AND_MEAN -DWIN32 -DWINVER=0x0500)
set(EXE_LIBS ${STATIC_LIB} ${FS_LIB} ws2_32 iphlpapi)
set(EXE_LIBS ${STATIC_LIB} ws2_32 iphlpapi)
if(RELEASE_MOTTO)
add_definitions(-DLLARP_RELEASE_MOTTO="${RELEASE_MOTTO}")

@ -68,7 +68,7 @@ if(ANDROID)
set(LOG_LIB log)
endif()
target_link_libraries(${UTIL_LIB} PUBLIC ${CRYPTOGRAPHY_LIB} ${FS_LIB} ${LOG_LIB})
target_link_libraries(${UTIL_LIB} PUBLIC ${CRYPTOGRAPHY_LIB} ${LOG_LIB})
target_link_libraries_system(${UTIL_LIB} absl::synchronization absl::hash absl::container nlohmann_json::nlohmann_json)
@ -259,7 +259,7 @@ endif()
add_library(${STATIC_LIB} STATIC ${LIB_SRC})
target_include_directories(${STATIC_LIB} PUBLIC ${CURL_INCLUDE_DIRS})
target_link_libraries(${STATIC_LIB} PUBLIC cxxopts ${ABYSS_LIB} ${PLATFORM_LIB} ${UTIL_LIB} ${CRYPTOGRAPHY_LIB} ${FS_LIB} ${CURL_LIBRARIES})
target_link_libraries(${STATIC_LIB} PUBLIC cxxopts ${ABYSS_LIB} ${PLATFORM_LIB} ${UTIL_LIB} ${CRYPTOGRAPHY_LIB} ${CURL_LIBRARIES})
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
target_include_directories(${PLATFORM_LIB} SYSTEM PUBLIC /usr/local/include)
@ -271,7 +271,7 @@ if(WITH_SHARED)
set(LIBS ${LIBS} Threads::Threads)
target_link_libraries(${SHARED_LIB} PUBLIC ${ABYSS_LIB} ${CRYPTOGRAPHY_LIB} ${UTIL_LIB} ${PLATFORM_LIB} ${LIBS})
if (WIN32)
target_link_libraries(${SHARED_LIB} PUBLIC ${FS_LIB} ws2_32 iphlpapi)
target_link_libraries(${SHARED_LIB} PUBLIC ws2_32 iphlpapi)
else()
install(TARGETS ${SHARED_LIB} LIBRARY DESTINATION lib)
endif()

@ -67,7 +67,7 @@ if(NOT WIN32)
target_link_libraries(${TEST_EXE} PUBLIC absl::variant)
else()
target_sources(${TEST_EXE} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/win32/test.rc")
target_link_libraries(${TEST_EXE} PUBLIC ${FS_LIB} ws2_32 iphlpapi shlwapi)
target_link_libraries(${TEST_EXE} PUBLIC ws2_32 iphlpapi shlwapi)
endif(NOT WIN32)
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")

@ -53,10 +53,6 @@ include_directories("${libuv_SOURCE_DIR}/include")
add_loki_dir(vendor/gtest)
add_subdirectory(${ABSEIL_DIR} "vendor/abseil-cpp")
if (FS_LIB STREQUAL "cppbackport")
add_loki_dir(vendor)
endif()
add_loki_dir(crypto)
add_loki_dir(llarp)
add_loki_dir(libabyss)

Loading…
Cancel
Save