### Options ### option(OWLPS_LISTENER_USES_CONFIG_FILE "Enable support for configuration files" on) option(OWLPS_LISTENER_USES_PTHREAD "Enable support for POSIX threads (mandatory for the autocalibration)" on) option(OWLPS_LISTENER_KEEPS_MONITOR "Enable -K (keep monitor mode on); requires POSIX threads support" off) configure_file( owlps-listener-config.h.in "${GENERATED_INCLUDE}/owlps-listener-config.h") ### Linked libraries ### set(EXTRA_LIBS ${EXTRA_LIBS} pcap) if (OWLPS_LISTENER_USES_CONFIG_FILE) set(EXTRA_LIBS ${EXTRA_LIBS} confuse) endif() if (OWLPS_LISTENER_USES_PTHREAD) set(EXTRA_LIBS ${EXTRA_LIBS} pthread) endif() ### Targets ### add_executable(owlps-listenerd owlps-listenerd.c) target_link_libraries(owlps-listenerd libowlps.so libowlps-client.so ${EXTRA_LIBS}) add_executable(owlps-listenerd.semistatic EXCLUDE_FROM_ALL owlps-listenerd.c) target_link_libraries(owlps-listenerd.semistatic libowlps.a libowlps-client.a ${EXTRA_LIBS}) # Add the semistatic target to the global list of semistatic targets list(APPEND OWLPS_SEMISTATIC_TARGETS owlps-listenerd.semistatic) set(OWLPS_SEMISTATIC_TARGETS ${OWLPS_SEMISTATIC_TARGETS} PARENT_SCOPE) add_executable(owlps-listenerd.static EXCLUDE_FROM_ALL owlps-listenerd.c) set_target_properties(owlps-listenerd.static PROPERTIES LINK_FLAGS -static) target_link_libraries(owlps-listenerd.static libowlps.a libowlps-client.a ${EXTRA_LIBS}) # Add the static target to the global list of static targets list(APPEND OWLPS_STATIC_TARGETS owlps-listenerd.static) set(OWLPS_STATIC_TARGETS ${OWLPS_STATIC_TARGETS} PARENT_SCOPE)