[abseil] Remove cctz dependency. Install all headers. Fixes #4442. Fixes #4373.

This commit is contained in:
Robert Schumacher 2018-10-11 21:10:13 -07:00
parent 29858b3cb2
commit 4ff1f50221
2 changed files with 7 additions and 12 deletions

View File

@ -17,8 +17,7 @@ endif()
function(add_sublibrary LIB)
file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc")
list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$|test_util.cc$|_benchmark.cc$")
file(GLOB HEADERS "absl/${LIB}/*.h" "absl/${LIB}/*.inc")
file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h")
file(GLOB_RECURSE HEADERS "absl/${LIB}/*.h" "absl/${LIB}/*.inc")
if(SOURCES)
if("STATIC" IN_LIST ARGN)
@ -33,7 +32,6 @@ function(add_sublibrary LIB)
target_include_directories(${LIB} INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<INSTALL_INTERFACE:include>)
endif()
install(TARGETS ${LIB} EXPORT unofficial-abseil-targets
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
@ -42,10 +40,11 @@ function(add_sublibrary LIB)
if(INSTALL_HEADERS)
if(HEADERS)
install(FILES ${HEADERS} DESTINATION "include/absl/${LIB}")
endif()
if(INTERNAL_HEADERS)
install(FILES ${INTERNAL_HEADERS} DESTINATION "include/absl/${LIB}/internal")
foreach(file IN LISTS HEADERS)
get_filename_component(dir ${file} DIRECTORY)
file(RELATIVE_PATH rel_dir ${CMAKE_SOURCE_DIR}/absl/${LIB} ${dir})
install(FILES ${file} DESTINATION "include/absl/${LIB}/${rel_dir}")
endforeach()
endif()
endif()
endfunction()
@ -85,9 +84,6 @@ target_link_public_libraries(utility base meta)
target_link_public_libraries(time base numeric)
target_link_public_libraries(synchronization base time)
find_package(unofficial-cctz REQUIRED)
target_link_libraries(time PUBLIC unofficial::cctz)
install(
EXPORT unofficial-abseil-targets
FILE unofficial-abseil-config.cmake

View File

@ -1,7 +1,6 @@
Source: abseil
Version: 2018-09-18
Version: 2018-09-18-3
Description: an open-source collection designed to augment the C++ standard library.
Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.
In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.
Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole.
Build-Depends: cctz