Allow to override LIB_SUFFIX
authorMichel Zou <xantares09@hotmail.com>
Wed, 30 Jan 2013 20:57:28 +0000 (21:57 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 4 Feb 2013 11:45:49 +0000 (12:45 +0100)
CMakeLists.txt

index 0bad0d7..3616c66 100644 (file)
@@ -46,10 +46,12 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
 set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
 set(CPACK_COMPONENT_HEADERS_GROUP    "Development")
 
-# automatically set lib suffix
-if ( UNIX AND NOT APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT EXISTS "/etc/debian_version" )
-  if ( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT LIB_SUFFIX )
-    set ( LIB_SUFFIX 64 )
+# guess LIB_SUFFIX, don't take debian multiarch into account 
+if ( NOT DEFINED LIB_SUFFIX )
+  if ( CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CROSSCOMPILING AND NOT EXISTS "/etc/debian_version" )
+    if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" )
+      set ( LIB_SUFFIX 64 )
+    endif ()
   endif ()
 endif ()