# # daytimed/CMakeLists.txt -- # cmake_minimum_required(VERSION 2.6) project(DAYTIMED C) find_package(PkgConfig) pkg_check_modules(LIBEVENT REQUIRED libevent) add_executable(daytimed-tcp daytimed-tcp.c tcp.c) add_executable(daytimed-udp daytimed-udp.c udp.c) add_executable(daytimed-tcp-udp daytimed-tcp-udp.c tcp.c udp.c) include_directories(${LIBEVENT_INCLUDE_DIRS}) link_directories(${LIBEVENT_LIBRARY_DIRS}) add_executable(daytimed-libevent daytimed-libevent.c tcp.c udp.c) target_link_libraries(daytimed-libevent ${LIBEVENT_LIBRARIES}) if(CMAKE_COMPILER_IS_GNUCC) add_definitions(--std=c99 -Wall) endif()