cmake_minimum_required(VERSION 2.6) PROJECT(uleddd C) INCLUDE(GNUInstallDirs) ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") SET(SOURCES main.c) SET(LIBS ubox ubus) ADD_EXECUTABLE(uledd ${SOURCES}) TARGET_LINK_LIBRARIES(uledd ${LIBS}) INSTALL(TARGETS uledd RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR} )