cmake_minimum_required(VERSION 2.8) add_custom_target(hello COMMAND echo "hello world") add_library(foo UNKNOWN IMPORTED) set_target_properties(foo PROPERTIES IMPORTED_LOCATION /usr/lib/libc.so ) add_dependencies(foo hello)