diff options
| author | Erik Kundiman <erik@megapahit.org> | 2023-12-18 20:42:30 +0800 | 
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2023-12-18 20:42:30 +0800 | 
| commit | b0e28d27bd990393e22ca3f474c340e77a08357b (patch) | |
| tree | 31698ce16af0883d128cb4cc804c25f85650c711 /indra/cmake | |
| parent | ee89162c037d693d63376762b417049f5f066672 (diff) | |
Unix install sets plugin dir to system library dir
because (at least) the vlc/plugins dirs are inside it in the same way
it's been inside llplugin. This is so the app can find system VLC
plugins. And for this, BUILD_SHARED_LIBS set on must work first on Linux
(has already been working on FreeBSD), since libmedia_plugin_libvlc is a
shared library (which now gets installed to system library dir too, on
both OSes).
Diffstat (limited to 'indra/cmake')
| -rw-r--r-- | indra/cmake/LibraryInstall.cmake | 9 | ||||
| -rw-r--r-- | indra/cmake/UnixInstall.cmake | 8 | 
2 files changed, 13 insertions, 4 deletions
| diff --git a/indra/cmake/LibraryInstall.cmake b/indra/cmake/LibraryInstall.cmake index 01838fe42e..b94841897c 100644 --- a/indra/cmake/LibraryInstall.cmake +++ b/indra/cmake/LibraryInstall.cmake @@ -2,5 +2,12 @@ list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES CMakeLists.txt)  #install(FILES ${${PROJECT_NAME}_HEADER_FILES}  #	DESTINATION include/${PROJECT_NAME})  if (BUILD_SHARED_LIBS) -	install(TARGETS ${PROJECT_NAME} DESTINATION lib) +	if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) +		set(_LIB lib/${ARCH}-linux-gnu) +	elseif (EXISTS /lib64) +		set(_LIB lib64) +	else () +		set(_LIB lib) +	endif () +	install(TARGETS ${PROJECT_NAME} DESTINATION ${_LIB})  endif () diff --git a/indra/cmake/UnixInstall.cmake b/indra/cmake/UnixInstall.cmake index 55b6889836..a748237c5b 100644 --- a/indra/cmake/UnixInstall.cmake +++ b/indra/cmake/UnixInstall.cmake @@ -9,11 +9,13 @@ if (INSTALL)    set(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH        "Top-level installation directory.") -  if (EXISTS /lib64) +  if (EXISTS ${CMAKE_SYSROOT}/usr/lib/${ARCH}-linux-gnu) +    set(_LIB lib/${ARCH}-linux-gnu) +  elseif (EXISTS /lib64)      set(_LIB lib64) -  else (EXISTS /lib64) +  else ()      set(_LIB lib) -  endif (EXISTS /lib64) +  endif ()    set(INSTALL_LIBRARY_DIR ${INSTALL_PREFIX}/${_LIB} CACHE PATH        "Installation directory for read-only shared files.") | 
