find_library(DBUS_LIBRARY name dbus-1d dbus-1d PATHS ${CMAKE_LIBRARY_PATH} ) include_directories(${CMAKE_INCLUDE_PATH}) add_executable(testcase testcase.c) target_link_libraries(testcase ${DBUS_LIBRARY} )