Commit 807763a7 by Derek Mauro Committed by Copybara-Service

CMake: Install TESTONLY libraries and their dependencies when

they are built

https://github.com/abseil/abseil-cpp/issues/1407

PiperOrigin-RevId: 513684529
Change-Id: Ie0a164eea32becfef8f8e4a112aee158fd93dd7e
parent d51d3cf3
......@@ -153,7 +153,6 @@ function(absl_cc_library)
# Generate a pkg-config file for every library:
if(ABSL_ENABLE_INSTALL)
if(NOT ABSL_CC_LIB_TESTONLY)
if(absl_VERSION)
set(PC_VERSION "${absl_VERSION}")
else()
......@@ -217,7 +216,6 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
INSTALL(FILES "${CMAKE_BINARY_DIR}/lib/pkgconfig/absl_${_NAME}.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif()
endif()
if(NOT ABSL_CC_LIB_IS_INTERFACE)
if(_build_type STREQUAL "dll_dep")
......@@ -332,9 +330,7 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
endif()
endif()
# TODO currently we don't install googletest alongside abseil sources, so
# installed abseil can't be tested.
if(NOT ABSL_CC_LIB_TESTONLY AND ABSL_ENABLE_INSTALL)
if(ABSL_ENABLE_INSTALL)
install(TARGETS ${_NAME} EXPORT ${PROJECT_NAME}Targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment