diff --git a/fs_test/CMakeLists.txt b/fs_test/CMakeLists.txt index 84760cf..16befb3 100644 --- a/fs_test/CMakeLists.txt +++ b/fs_test/CMakeLists.txt @@ -24,9 +24,9 @@ add_executable(lwext4-mbr lwext4_mbr.c) target_link_libraries(lwext4-mbr blockdev) target_link_libraries(lwext4-mbr lwext4) -install (TARGETS lwext4-server DESTINATION /usr/bin) -install (TARGETS lwext4-client DESTINATION /usr/bin) -install (TARGETS lwext4-generic DESTINATION /usr/bin) -install (TARGETS lwext4-mkfs DESTINATION /usr/bin) -install (TARGETS lwext4-mbr DESTINATION /usr/bin) +install (TARGETS lwext4-server DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +install (TARGETS lwext4-client DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +install (TARGETS lwext4-generic DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +install (TARGETS lwext4-mkfs DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) +install (TARGETS lwext4-mbr DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3b82fcf..257b8cc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,6 +17,6 @@ else() endif() if (DEFINED INSTALL_LIB) -INSTALL(TARGETS lwext4 DESTINATION /usr/local/lib) -INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/include/. DESTINATION /usr/local/include/lwext4) -endif() \ No newline at end of file +INSTALL(TARGETS lwext4 DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) +INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/include/. DESTINATION ${CMAKE_INSTALL_PREFIX}/include/lwext4) +endif()