1include(GNUInstallDirs) 2 3# absl_VERSION is only set if we are an LTS release being installed, in which 4# case it may be into a system directory and so we need to make subdirectories 5# for each installed version of Abseil. This mechanism is implemented in 6# Abseil's internal Copybara (https://github.com/google/copybara) workflows and 7# isn't visible in the CMake buildsystem itself. 8 9if(absl_VERSION) 10 set(ABSL_SUBDIR "${PROJECT_NAME}_${PROJECT_VERSION}") 11 set(ABSL_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}/${ABSL_SUBDIR}") 12 set(ABSL_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${ABSL_SUBDIR}") 13 set(ABSL_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/{ABSL_SUBDIR}") 14 set(ABSL_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${ABSL_SUBDIR}") 15else() 16 set(ABSL_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}") 17 set(ABSL_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") 18 set(ABSL_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}") 19 set(ABSL_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}") 20endif()