mirror of
https://github.com/mumble-voip/mumble.git
synced 2025-10-26 11:19:16 +00:00
Merge PR #4481: BUILD(cmake): Fix plugins install directory
This commit is contained in:
commit
557bf8d3f0
@ -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()
|
||||
|
||||
@ -29,7 +29,7 @@ foreach(ITEM ${ITEMS})
|
||||
else()
|
||||
# Shared library on UNIX (e.g. ".so")
|
||||
set_target_properties(${ITEM} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
|
||||
install(TARGETS ${ITEM} LIBRARY DESTINATION lib/plugins COMPONENT mumble_client)
|
||||
install(TARGETS ${ITEM} LIBRARY DESTINATION "${MUMBLE_INSTALL_LIBDIR}/plugins" COMPONENT mumble_client)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@ -554,7 +554,7 @@ if(bundled-celt)
|
||||
else()
|
||||
# Shared library on UNIX (e.g. ".so")
|
||||
set_target_properties(celt PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
install(TARGETS celt LIBRARY DESTINATION lib)
|
||||
install(TARGETS celt LIBRARY DESTINATION "${MUMBLE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
else()
|
||||
find_pkg(celt REQUIRED)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user