cmake: add multilib support
authorChristoph Junghans <junghans@votca.org>
Sat, 17 Jun 2017 02:03:11 +0000 (20:03 -0600)
committerMathis Rosenhauer <rosenhauer@dkrz.de>
Thu, 22 Jun 2017 07:11:00 +0000 (09:11 +0200)
Follow GNU convention for install directories, especially using
`lib64` instead of `lib`.

Signed-off-by: Christoph Junghans <junghans@votca.org>
src/CMakeLists.txt

index 5f71703..f53bf22 100644 (file)
@@ -28,6 +28,7 @@ IF(UNIX)
     )
 ENDIF(UNIX)
 
+INCLUDE(GNUInstallDirs)
 IF(WIN32)
   INSTALL(TARGETS aec sz
     RUNTIME
@@ -39,19 +40,19 @@ IF(WIN32)
 ELSE(WIN32)
   INSTALL(TARGETS aec sz
     LIBRARY
-    DESTINATION lib
+    DESTINATION ${CMAKE_INSTALL_LIBDIR}
     ARCHIVE
-    DESTINATION lib
+    DESTINATION ${CMAKE_INSTALL_LIBDIR}
     COMPONENT libraries
     )
 ENDIF(WIN32)
 INSTALL(FILES libaec.h szlib.h
-  DESTINATION include
+  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
   COMPONENT headers
   )
 INSTALL(TARGETS aec_client
   RUNTIME
-  DESTINATION bin
+  DESTINATION ${CMAKE_INSTALL_BINDIR}
   COMPONENT applications
   )