diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e17cdd6f6..7bba988b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,7 @@ list(APPEND CMAKE_MODULE_PATH include(pkg-utils) include(CTest) include(project-utils) +include(GNUInstallDirs) option(BUILD_TESTING "Build tests." OFF) @@ -84,6 +85,21 @@ endif() include(compiler) include(os) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + if(UNIX) + # Use default GNU location + set(DEFAULT_LIBDIR "${CMAKE_INSTALL_LIBDIR}/mumble") + else() + # Default to current directory + set(DEFAULT_LIBDIR "./lib/mumble") + endif() +else() + # Use a path relative to the prefix + set(DEFAULT_LIBDIR "${CMAKE_INSTALL_PREFIX}/lib/mumble") +endif() + +set(MUMBLE_INSTALL_LIBDIR "${DEFAULT_LIBDIR}" CACHE STRING "The path to which Mumble will install its plugins") + if (64_BIT) set(ARCH "64bit") else() |