cmake lib lib64 problem 49/3149/1
authorAndy Green <andy.green@linaro.org>
Tue, 26 Feb 2013 03:58:45 +0000 (11:58 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:38 +0000 (13:01 -0800)
As discussed here, there's a semi-standardized way to inform
cmake that the install target wants its libs in .../lib64

https://code.google.com/p/bullet/issues/detail?id=174

this patch adds the necessary fiddling

Signed-off-by: Andy Green <andy.green@linaro.org>
CMakeLists.txt
README.build

index 71402a2..4e40683 100644 (file)
@@ -679,7 +679,7 @@ if (UNIX)
 file(WRITE ${PROJECT_BINARY_DIR}/libwebsockets.pc
 "prefix=/usr/local
 exec_prefix=\${prefix}
-libdir=\${exec_prefix}/lib
+libdir=\${exec_prefix}/lib${LIB_SUFFIX}
 includedir=\${prefix}/include
 
 Name: libwebsockets
@@ -702,8 +702,8 @@ set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "Header files")
 
 # Install libs.
 install(TARGETS websockets websockets_shared
-               LIBRARY DESTINATION lib
-               ARCHIVE DESTINATION lib
+               LIBRARY DESTINATION lib${LIB_SUFFIX}
+               ARCHIVE DESTINATION lib${LIB_SUFFIX}
                COMPONENT libraries)
 set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
 
index 64d98cf..3994c9c 100644 (file)
@@ -283,12 +283,19 @@ Building on Unix:
         the source directory of libwebsockets containing the CMakeLists.txt project
         file. All examples in this file assumes you use "..")
 
+       NOTE2
        A common option you may want to give is to set the install path, same
        as --prefix= with autotools.  It defaults to /usr/local.
        You can do this by, eg
 
        cmake .. -DCMAKE_INSTALL_PREFIX:PATH=/usr
 
+       NOTE3
+       On machines that want libraries in lib64, you can also add the
+       following to the cmake line
+
+               -DLIB_SUFFIX=64
+
 4. Finally you can build using the generated Makefile:
 
        make