Skip to content

Commit

Permalink
Merge pull request #3 from notspiff/fix_multiarch
Browse files Browse the repository at this point in the history
fixed: only install to multiarch paths if prefix is /usr
  • Loading branch information
wsnipex committed Mar 23, 2015
2 parents d6a5f85 + e022656 commit 48bdd98
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions UseMultiArch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

# Fedora uses lib64/ for 64-bit systems, Debian uses lib/x86_64-linux-gnu;
# Fedora put module files in lib64/ too, but Debian uses lib/ for that
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" AND
"${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
# Debian or Ubuntu?
if (EXISTS "/etc/debian_version")
set (_libdir_def "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
Expand All @@ -28,10 +29,10 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
endif (CMAKE_SIZEOF_VOID_P EQUAL 8)
set (_libdir_def "${_libdir_noarch}")
endif (EXISTS "/etc/debian_version")
else ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
else ()
set (_libdir_def "lib")
set (_libdir_noarch "lib")
endif ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
endif ()

# let the user override if somewhere else is desirable
set (CMAKE_INSTALL_LIBDIR "${_libdir_def}" CACHE PATH "Object code libraries")
Expand Down

0 comments on commit 48bdd98

Please sign in to comment.