From 3c19f1a2f4f4033b50042d13359581ca2dc3abc1 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 7 Oct 2012 13:58:59 +0200 Subject: [PATCH] Changed: Don't use CMAKE_LIBRARY_ARCHITECTURE at all, because not reliable enough --- code/CMakeModules/nel.cmake | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 4875be6d6..67deb84e4 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -436,21 +436,16 @@ MACRO(NL_SETUP_BUILD) SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -DHAVE_ARM") 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 - IF(CMAKE_LIBRARY_ARCHITECTURE) - SET(CMAKE_LIBRARY_PATH /lib/${CMAKE_LIBRARY_ARCHITECTURE} /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_PATH}) + IF(LIBRARY_ARCHITECTURE) + SET(CMAKE_LIBRARY_PATH /lib/${LIBRARY_ARCHITECTURE} /usr/lib/${LIBRARY_ARCHITECTURE} ${CMAKE_LIBRARY_PATH}) IF(TARGET_X64) SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib64 /usr/lib64) ENDIF(TARGET_X64) IF(TARGET_X86) SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /lib32 /usr/lib32) ENDIF(TARGET_X86) - ENDIF(CMAKE_LIBRARY_ARCHITECTURE) + ENDIF(LIBRARY_ARCHITECTURE) IF(MSVC) IF(MSVC10) @@ -685,11 +680,11 @@ MACRO(NL_SETUP_PREFIX_PATHS) ## Allow override of install_prefix/lib path. IF(NOT NL_LIB_PREFIX) - IF(CMAKE_LIBRARY_ARCHITECTURE) - SET(NL_LIB_PREFIX "lib/${CMAKE_LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.") - ELSE(CMAKE_LIBRARY_ARCHITECTURE) + IF(LIBRARY_ARCHITECTURE) + SET(NL_LIB_PREFIX "lib/${LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.") + ELSE(LIBRARY_ARCHITECTURE) SET(NL_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.") - ENDIF(CMAKE_LIBRARY_ARCHITECTURE) + ENDIF(LIBRARY_ARCHITECTURE) ENDIF(NOT NL_LIB_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(NL_LIB_PREFIX NL_LIB_ABSOLUTE_PREFIX) @@ -698,11 +693,11 @@ MACRO(NL_SETUP_PREFIX_PATHS) IF(WIN32) SET(NL_DRIVER_PREFIX "." CACHE PATH "Installation path for drivers.") ELSE(WIN32) - IF(CMAKE_LIBRARY_ARCHITECTURE) - SET(NL_DRIVER_PREFIX "lib/${CMAKE_LIBRARY_ARCHITECTURE}/nel" CACHE PATH "Installation path for drivers.") - ELSE(CMAKE_LIBRARY_ARCHITECTURE) + IF(LIBRARY_ARCHITECTURE) + SET(NL_DRIVER_PREFIX "lib/${LIBRARY_ARCHITECTURE}/nel" CACHE PATH "Installation path for drivers.") + ELSE(LIBRARY_ARCHITECTURE) SET(NL_DRIVER_PREFIX "lib/nel" CACHE PATH "Installation path for drivers.") - ENDIF(CMAKE_LIBRARY_ARCHITECTURE) + ENDIF(LIBRARY_ARCHITECTURE) ENDIF(WIN32) ENDIF(NOT NL_DRIVER_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. IF(NOT RYZOM_LIB_PREFIX) - IF(CMAKE_LIBRARY_ARCHITECTURE) - SET(RYZOM_LIB_PREFIX "lib/${CMAKE_LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.") - ELSE(CMAKE_LIBRARY_ARCHITECTURE) + IF(LIBRARY_ARCHITECTURE) + SET(RYZOM_LIB_PREFIX "lib/${LIBRARY_ARCHITECTURE}" CACHE PATH "Installation path for libraries.") + ELSE(LIBRARY_ARCHITECTURE) SET(RYZOM_LIB_PREFIX "lib" CACHE PATH "Installation path for libraries.") - ENDIF(CMAKE_LIBRARY_ARCHITECTURE) + ENDIF(LIBRARY_ARCHITECTURE) ENDIF(NOT RYZOM_LIB_PREFIX) NL_MAKE_ABSOLUTE_PREFIX(RYZOM_LIB_PREFIX RYZOM_LIB_ABSOLUTE_PREFIX)