diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index b3ad67d2c..545dd22df 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -131,10 +131,11 @@ add_custom_command( COMMAND ${CMAKE_CTEST_COMMAND} ) ############ Installation section ############ -set(include_install_dir "include") -set(lib_install_dir "lib/") -set(bin_install_dir "bin/") -set(config_install_dir "lib/cmake/") +include(GNUInstallDirs) +set(include_install_dir "${CMAKE_INSTALL_INCLUDEDIR}") +set(lib_install_dir "${CMAKE_INSTALL_LIBDIR}/") +set(bin_install_dir "${CMAKE_INSTALL_BINDIR}/") +set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/") set(project_config "${CMAKE_CURRENT_BINARY_DIR}/generated/${PROJECT_NAME}Config.cmake") set(targets_export_name "${PROJECT_NAME}Targets")