diff options
author | Sergey Avseyev <sergey.avseyev@gmail.com> | 2017-11-06 21:38:53 +0300 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2017-11-06 10:38:53 -0800 |
commit | 2edb1dcdda320ac99ac87df514b7e2ca5c1e500c (patch) | |
tree | 5d6cd5d3c3a52ed9af04afdb1843368c27c247bc | |
parent | 6eb031de9ae03bef7ae7370b6843384c806f4eb3 (diff) | |
download | flatbuffers-2edb1dcdda320ac99ac87df514b7e2ca5c1e500c.tar.gz flatbuffers-2edb1dcdda320ac99ac87df514b7e2ca5c1e500c.tar.bz2 flatbuffers-2edb1dcdda320ac99ac87df514b7e2ca5c1e500c.zip |
Use CMake install directories instead of hardcoded (#4481)
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1537d835..03291478 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,15 +239,16 @@ if(FLATBUFFERS_BUILD_GRPCTEST) endif() if(FLATBUFFERS_INSTALL) - install(DIRECTORY include/flatbuffers DESTINATION include) + include(GNUInstallDirs) + install(DIRECTORY include/flatbuffers DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) if(FLATBUFFERS_BUILD_FLATLIB) - install(TARGETS flatbuffers DESTINATION lib) + install(TARGETS flatbuffers DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() if(FLATBUFFERS_BUILD_FLATC) - install(TARGETS flatc DESTINATION bin) + install(TARGETS flatc DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() if(FLATBUFFERS_BUILD_SHAREDLIB) - install(TARGETS flatbuffers_shared DESTINATION lib) + install(TARGETS flatbuffers_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() endif() |