Drop 64bit lib suffix on debian systems
authorMichel Zou <xantares09@hotmail.com>
Fri, 21 Oct 2011 12:17:49 +0000 (14:17 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 21 Oct 2011 12:17:49 +0000 (14:17 +0200)
CMakeLists.txt

index f7df0a9..c6a823f 100644 (file)
@@ -43,17 +43,20 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
 set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
 set(CPACK_COMPONENT_HEADERS_GROUP    "Development")
 
+if(UNIX 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")
+  endif()
+endif()
+
 if(NOT APPLE)
   # Create suffix to eventually install in lib64
   if(CMAKE_SIZEOF_VOID_P EQUAL 4)
-      SET(LIB_SUFFIX "")
       SET(PACK_ARCH "")
     else(CMAKE_SIZEOF_VOID_P EQUAL 8)
-      SET(LIB_SUFFIX 64)
       SET(PACK_ARCH .x86_64)
   endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
 else(NOT APPLE)
-  SET(LIB_SUFFIX "")
   SET(PACK_ARCH "")
 endif(NOT APPLE)