if cppbackport is built, make that consistent too

This commit is contained in:
Rick V 2019-08-29 10:22:58 -05:00
parent fb70d7afc9
commit 5ecc76a332
No known key found for this signature in database
GPG Key ID: C0EDC8723FDC3465
2 changed files with 4 additions and 3 deletions

View File

@ -175,6 +175,10 @@ endif()
add_subdirectory(${ABSEIL_DIR})
add_subdirectory(vendor/gtest)
if (FS_LIB STREQUAL "cppbackport")
add_subdirectory(vendor)
endif()
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)

View File

@ -34,7 +34,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android")
find_library(FS_LIB NAMES c++fs c++experimental stdc++fs)
if(FS_LIB STREQUAL FS_LIB-NOTFOUND)
add_subdirectory(vendor)
include_directories("${CMAKE_CURRENT_LIST_DIR}/../vendor/cppbackport-master/lib")
add_definitions(-DLOKINET_USE_CPPBACKPORT)
set(FS_LIB cppbackport)
@ -50,7 +49,6 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_library(FS_LIB NAMES c++fs c++experimental stdc++fs)
if(FS_LIB STREQUAL FS_LIB-NOTFOUND)
add_subdirectory(vendor)
include_directories("${CMAKE_CURRENT_LIST_DIR}/../vendor/cppbackport-master/lib")
add_definitions(-DLOKINET_USE_CPPBACKPORT)
set(FS_LIB cppbackport)
@ -64,7 +62,6 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
link_libraries(-lkstat -lsendfile)
endif()
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_subdirectory(vendor)
include_directories("${CMAKE_CURRENT_LIST_DIR}/../vendor/cppbackport-master/lib")
add_definitions(-DLOKINET_USE_CPPBACKPORT)
set(FS_LIB cppbackport)