dev-cafe / autocmake

CMake plugin composer.
http://autocmake.org
BSD 3-Clause "New" or "Revised" License
42 stars 18 forks source link

default_build_paths and GNUInstallDirs #228

Closed robertodr closed 6 years ago

robertodr commented 6 years ago

Should default_build_paths.cmake use GNUInstallDirs? It currently stores binaries under ${CMAKE_BINARY_DIR}/bin and libraries under ${CMAKE_BINARY_DIR}/lib but on 64-bit system the latter should rather be ${CMAKE_BINARY_DIR}/lib64.

robertodr commented 6 years ago

The fix would be:

include(GNUInstallDirs)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR})
bast commented 6 years ago

Yes, you are right. Your suggestion is better than the current solution.