diff --git a/cmd/CMakeLists.txt b/cmd/CMakeLists.txt index 5e4ddec2c4..10d0593600 100644 --- a/cmd/CMakeLists.txt +++ b/cmd/CMakeLists.txt @@ -8,8 +8,8 @@ endforeach(CMD) function(add_cmd CMD_SRC IS_GUI) # Extract the filename without an extension (NAME_WE) - get_filename_component(CMD_NAME ${CMD} NAME_WE) - add_executable(${CMD_NAME} ${CMD}) + get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE) + add_executable(${CMD_NAME} ${CMD_SRC}) target_link_libraries(${CMD_NAME} PRIVATE $,mrtrix::gui,mrtrix::headless> mrtrix::exec-version-lib