Use MultiArch-unaware path for dune.module
As of 2013-09 the DUNE code that reads dune.module is not MultiArch- aware. Thus, for a 64-bit platform it will look in lib/ on Debian and lib64/ on RHEL.
This commit is contained in:
parent
c4bb95ed55
commit
9aca9bd746
@ -8,6 +8,7 @@
|
|||||||
# _TARGET CMake target which builds the library
|
# _TARGET CMake target which builds the library
|
||||||
# _LIBRARY_TYPE Static or shared library
|
# _LIBRARY_TYPE Static or shared library
|
||||||
# _DEBUG File containing debug symbols
|
# _DEBUG File containing debug symbols
|
||||||
|
include (UseMultiArch)
|
||||||
|
|
||||||
macro (opm_install opm)
|
macro (opm_install opm)
|
||||||
foreach (_hdr IN LISTS ${opm}_HEADERS)
|
foreach (_hdr IN LISTS ${opm}_HEADERS)
|
||||||
@ -48,8 +49,10 @@ macro (opm_install opm)
|
|||||||
DESTINATION ${_dbg_prefix}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${${opm}_VER_DIR}
|
DESTINATION ${_dbg_prefix}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${${opm}_VER_DIR}
|
||||||
)
|
)
|
||||||
endif (${opm}_LIBRARY_TYPE STREQUAL "SHARED" AND ${opm}_TARGET AND ${opm}_DEBUG)
|
endif (${opm}_LIBRARY_TYPE STREQUAL "SHARED" AND ${opm}_TARGET AND ${opm}_DEBUG)
|
||||||
|
# note that the DUNE parts that looks for dune.module is currently (2013-09) not
|
||||||
|
# multiarch-aware and will thus put in lib64/ on RHEL and lib/ on Debian
|
||||||
install (
|
install (
|
||||||
FILES ${PROJECT_SOURCE_DIR}/dune.module
|
FILES ${PROJECT_SOURCE_DIR}/dune.module
|
||||||
DESTINATION lib${${opm}_VER_DIR}/dunecontrol/${${opm}_NAME}
|
DESTINATION ${LIBDIR_MULTIARCH_UNAWARE}${${opm}_VER_DIR}/dunecontrol/${${opm}_NAME}
|
||||||
)
|
)
|
||||||
endmacro (opm_install opm)
|
endmacro (opm_install opm)
|
||||||
|
@ -41,6 +41,11 @@ function (find_dune_version suite module)
|
|||||||
|
|
||||||
# some modules does not have a library, use the directory of the
|
# some modules does not have a library, use the directory of the
|
||||||
# header files to find what would be the library dir.
|
# header files to find what would be the library dir.
|
||||||
|
# note that when we refer to a build tree, then the libraries always
|
||||||
|
# go into lib/, but we don't care about that because in that case,
|
||||||
|
# dune.module isn't in the lib/ directory anyway but must be retrieved
|
||||||
|
# from the source. hence, we only have to worry about the library
|
||||||
|
# directory of a system installation here.
|
||||||
if (NOT ${suite}-${module}_LIBRARY)
|
if (NOT ${suite}-${module}_LIBRARY)
|
||||||
# this suffix is gotten from UseMultiArch.cmake
|
# this suffix is gotten from UseMultiArch.cmake
|
||||||
set (_lib_path "${_inc_path}/${CMAKE_INSTALL_LIBDIR}")
|
set (_lib_path "${_inc_path}/${CMAKE_INSTALL_LIBDIR}")
|
||||||
@ -72,7 +77,7 @@ function (find_dune_version suite module)
|
|||||||
# from this point on, _lib_path does not contain an architecture-
|
# from this point on, _lib_path does not contain an architecture-
|
||||||
# specific component anymore; dune.module is always put in straight
|
# specific component anymore; dune.module is always put in straight
|
||||||
# noarch lib/ since it does not contain any paths to binaries
|
# noarch lib/ since it does not contain any paths to binaries
|
||||||
set (_dune_mod "${_lib_path}/lib${_multilib}/dunecontrol/${suite}-${module}/dune.module")
|
set (_dune_mod "${_lib_path}/${LIBDIR_MULTIARCH_UNAWARE}${_multilib}/dunecontrol/${suite}-${module}/dune.module")
|
||||||
if (NOT EXISTS "${_dune_mod}")
|
if (NOT EXISTS "${_dune_mod}")
|
||||||
# use the name itself as a flag for whether it was found or not
|
# use the name itself as a flag for whether it was found or not
|
||||||
set (_dune_mod "")
|
set (_dune_mod "")
|
||||||
|
Loading…
Reference in New Issue
Block a user