--- mlpack-3.0.4/CMakeLists.txt 2018-11-13 17:33:55.000000000 -0500 +++ mlpack-3.0.4/CMakeLists.txt.b 2019-02-09 00:48:37.707835375 -0500 @@ -190,6 +190,12 @@ add_definitions(-DARMA_EXTRA_DEBUG) endif() +if (LIBDIR) + message(STATUS "Setting libdir to ${LIBDIR}.") +else () + set(LIBDIR "lib") +endif () + # Now, find the libraries we need to compile against. Several variables can be # set to manually specify the directory in which each of these libraries # resides. @@ -569,5 +575,5 @@ # Do we need a different directory? install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib/pkgconfig/mlpack.pc - DESTINATION lib/pkgconfig/) + DESTINATION ${LIBDIR}/pkgconfig/) endif () --- mlpack-3.0.4/src/mlpack/CMakeLists.txt 2018-11-13 17:33:55.000000000 -0500 +++ mlpack-3.0.4/src/mlpack/CMakeLists.txt.b 2019-02-08 17:11:39.599468186 -0500 @@ -97,8 +97,8 @@ # be entered... install(TARGETS mlpack RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) + LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION ${LIBDIR}) add_dependencies(mlpack mlpack_headers)