Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 1 | From 771d79eeb0ac5079482a4b3a131bbda744793e7d Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 19 Dec 2019 20:07:11 -0800 |
| 4 | Subject: [PATCH] cmake: Use GNUInstallDirs |
| 5 | |
| 6 | Helps install cmakefiles in right libdir |
| 7 | |
| 8 | Upstream-Status: Submitted [https://github.com/zaphoyd/websocketpp/pull/854] |
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 10 | --- |
| 11 | CMakeLists.txt | 4 +++- |
| 12 | 1 file changed, 3 insertions(+), 1 deletion(-) |
| 13 | |
| 14 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 15 | index 2786aba..080be3e 100644 |
| 16 | --- a/CMakeLists.txt |
| 17 | +++ b/CMakeLists.txt |
| 18 | @@ -39,11 +39,13 @@ endif() |
| 19 | |
| 20 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) |
| 21 | |
| 22 | +include(GNUInstallDirs) |
| 23 | + |
| 24 | set(INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files") |
| 25 | if (WIN32 AND NOT CYGWIN) |
| 26 | set (DEF_INSTALL_CMAKE_DIR cmake) |
| 27 | else () |
| 28 | - set (DEF_INSTALL_CMAKE_DIR lib/cmake/websocketpp) |
| 29 | + set (DEF_INSTALL_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/websocketpp) |
| 30 | endif () |
| 31 | set (INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files") |
| 32 | |
| 33 | -- |
| 34 | 2.24.1 |
| 35 | |