Changed: Don't use CMAKE_LIBRARY_ARCHITECTURE at all, because not reliable enough

This commit is contained in:
kervala 2012-10-07 13:58:59 +02:00
parent 0698f1abc2
commit 19481e0e1d

View file

@ -436,21 +436,16 @@ MACRO(NL_SETUP_BUILD)
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -DHAVE_ARM") SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -DHAVE_ARM")
ENDIF(TARGET_CPU STREQUAL "x86_64") ENDIF(TARGET_CPU STREQUAL "x86_64")
# Override CMAKE_LIBRARY_ARCHITECTURE that is automatically determinated
IF(LIBRARY_ARCHITECTURE)
SET(CMAKE_LIBRARY_ARCHITECTURE ${LIBRARY_ARCHITECTURE})
ENDIF(LIBRARY_ARCHITECTURE)
# Fix library paths suffixes for Debian MultiArch # Fix library paths suffixes for Debian MultiArch
IF(CMAKE_LIBRARY_ARCHITECTURE) IF(LIBRARY_ARCHITECTURE)
SET(CMAKE_LIBRARY_PATH /lib/${CMAKE_LIBRARY_ARCHITECTURE} /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_PATH}) SET(CMAKE_LIBRARY_PATH /lib/${LIBRARY_ARCHITECTURE} /usr/lib/${LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_PATH})
IF(TARGET_X64) IF(TARGET_X64)
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib64 /usr/lib64) SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib64 /usr/lib64)
ENDIF(TARGET_X64) ENDIF(TARGET_X64)
IF(TARGET_X86) IF(TARGET_X86)
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib32 /usr/lib32) SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib32 /usr/lib32)
ENDIF(TARGET_X86) ENDIF(TARGET_X86)
ENDIF(CMAKE_LIBRARY_ARCHITECTURE) ENDIF(LIBRARY_ARCHITECTURE)
IF(MSVC) IF(MSVC)
IF(MSVC10) IF(MSVC10)
@ -685,11 +680,11 @@ MACRO(NL_SETUP_PREFIX_PATHS)
## Allow override of install_prefix/lib path. ## Allow override of install_prefix/lib path.
IF(NOT NL_LIB_PREFIX) IF(NOT NL_LIB_PREFIX)
IF(CMAKE_LIBRARY_ARCHITECTURE) IF(LIBRARY_ARCHITECTURE)
SET(NL_LIB_PREFIX "lib/${CMAKE_LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.") SET(NL_LIB_PREFIX "lib/${LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.")
ELSE(CMAKE_LIBRARY_ARCHITECTURE) ELSE(LIBRARY_ARCHITECTURE)
SET(NL_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.") SET(NL_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.")
ENDIF(CMAKE_LIBRARY_ARCHITECTURE) ENDIF(LIBRARY_ARCHITECTURE)
ENDIF(NOT NL_LIB_PREFIX) ENDIF(NOT NL_LIB_PREFIX)
NL_MAKE_ABSOLUTE_PREFIX(NL_LIB_PREFIX NL_LIB_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(NL_LIB_PREFIX NL_LIB_ABSOLUTE_PREFIX)
@ -698,11 +693,11 @@ MACRO(NL_SETUP_PREFIX_PATHS)
IF(WIN32) IF(WIN32)
SET(NL_DRIVER_PREFIX "." CACHE PATH "Installation path for drivers.") SET(NL_DRIVER_PREFIX "." CACHE PATH "Installation path for drivers.")
ELSE(WIN32) ELSE(WIN32)
IF(CMAKE_LIBRARY_ARCHITECTURE) IF(LIBRARY_ARCHITECTURE)
SET(NL_DRIVER_PREFIX "lib/${CMAKE_LIBRARY_ARCHITECTURE}/nel" CACHE PATH "Installation path for drivers.") SET(NL_DRIVER_PREFIX "lib/${LIBRARY_ARCHITECTURE}/nel" CACHE PATH "Installation path for drivers.")
ELSE(CMAKE_LIBRARY_ARCHITECTURE) ELSE(LIBRARY_ARCHITECTURE)
SET(NL_DRIVER_PREFIX "lib/nel" CACHE PATH "Installation path for drivers.") SET(NL_DRIVER_PREFIX "lib/nel" CACHE PATH "Installation path for drivers.")
ENDIF(CMAKE_LIBRARY_ARCHITECTURE) ENDIF(LIBRARY_ARCHITECTURE)
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(NOT NL_DRIVER_PREFIX) ENDIF(NOT NL_DRIVER_PREFIX)
NL_MAKE_ABSOLUTE_PREFIX(NL_DRIVER_PREFIX NL_DRIVER_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(NL_DRIVER_PREFIX NL_DRIVER_ABSOLUTE_PREFIX)
@ -752,11 +747,11 @@ MACRO(RYZOM_SETUP_PREFIX_PATHS)
## Allow override of install_prefix/lib path. ## Allow override of install_prefix/lib path.
IF(NOT RYZOM_LIB_PREFIX) IF(NOT RYZOM_LIB_PREFIX)
IF(CMAKE_LIBRARY_ARCHITECTURE) IF(LIBRARY_ARCHITECTURE)
SET(RYZOM_LIB_PREFIX "lib/${CMAKE_LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.") SET(RYZOM_LIB_PREFIX "lib/${LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.")
ELSE(CMAKE_LIBRARY_ARCHITECTURE) ELSE(LIBRARY_ARCHITECTURE)
SET(RYZOM_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.") SET(RYZOM_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.")
ENDIF(CMAKE_LIBRARY_ARCHITECTURE) ENDIF(LIBRARY_ARCHITECTURE)
ENDIF(NOT RYZOM_LIB_PREFIX) ENDIF(NOT RYZOM_LIB_PREFIX)
NL_MAKE_ABSOLUTE_PREFIX(RYZOM_LIB_PREFIX RYZOM_LIB_ABSOLUTE_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(RYZOM_LIB_PREFIX RYZOM_LIB_ABSOLUTE_PREFIX)