list(APPEND CMAKE_REQUIRED_DEFINITIONS) INCLUDE(FindPkgConfig) IF(NOT PKG_CONFIG_FOUND) MESSAGE(FATAL_ERROR "Error: pkg-config not found on this system") ENDIF(NOT PKG_CONFIG_FOUND) set(MMFD_CFLAGS "-Wall ${LIBBABELHELPER_CFLAGS_OTHER} -O0 -std=gnu11") include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${MMFD_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${LIBBABELHELPER_INCLUDE_DIR}) add_executable(mmfd util.c main.c babeld.c neighbour.c vector.c) target_link_libraries(mmfd ${LIBNL_LIBRARIES} ${LIBBABELHELPER_LIBRARIES} ${LIBNL_GENL_LIBRARIES}) set_property(TARGET mmfd PROPERTY COMPILE_FLAGS ${MMFD_CFLAGS}) install(TARGETS mmfd RUNTIME DESTINATION bin)