Austin Schuh | 36244a1 | 2019-09-21 17:52:38 -0700 | [diff] [blame] | 1 | include(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 | |
| 9 | if(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}") |
Austin Schuh | b4691e9 | 2020-12-31 12:37:18 -0800 | [diff] [blame] | 13 | set(ABSL_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/${ABSL_SUBDIR}") |
Austin Schuh | 36244a1 | 2019-09-21 17:52:38 -0700 | [diff] [blame] | 14 | set(ABSL_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${ABSL_SUBDIR}") |
| 15 | else() |
| 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}") |
Austin Schuh | b4691e9 | 2020-12-31 12:37:18 -0800 | [diff] [blame] | 20 | endif() |