2018-05-21 23:46:18 +00:00
|
|
|
# CMakeLists.txt
|
|
|
|
#
|
|
|
|
# Wireshark - Network traffic analyzer
|
|
|
|
# By Gerald Combs <gerald@wireshark.org>
|
|
|
|
# Copyright 1998 Gerald Combs
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.1)
|
|
|
|
cmake_policy(SET CMP0048 NEW)
|
|
|
|
|
|
|
|
project(Hello VERSION 0.0.1 DESCRIPTION "Wireshark Hello Plugin" LANGUAGES C)
|
|
|
|
|
2018-08-23 21:03:28 +00:00
|
|
|
find_package(Wireshark CONFIG REQUIRED)
|
2018-05-21 23:46:18 +00:00
|
|
|
|
2018-08-23 21:03:28 +00:00
|
|
|
if(NOT Wireshark_PLUGINS_ENABLED)
|
2021-02-06 16:35:51 +00:00
|
|
|
message(WARNING "Wireshark was compiled without support for plugins")
|
2018-05-21 23:46:18 +00:00
|
|
|
endif()
|
|
|
|
|
2018-05-23 13:31:21 +00:00
|
|
|
set(CMAKE_C_VISIBILITY_PRESET hidden)
|
|
|
|
if (CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
set(CMAKE_C_FLAGS "-Wall -Wextra ${CMAKE_C_FLAGS}")
|
|
|
|
endif()
|
|
|
|
|
2018-08-23 21:03:28 +00:00
|
|
|
add_definitions(-DVERSION=\"${PROJECT_VERSION}\")
|
2018-05-21 23:46:18 +00:00
|
|
|
|
|
|
|
add_library(hello MODULE hello.c)
|
2018-05-23 13:31:21 +00:00
|
|
|
set_target_properties(hello PROPERTIES PREFIX "" DEFINE_SYMBOL "")
|
2018-08-23 21:03:28 +00:00
|
|
|
target_link_libraries(hello epan)
|
2018-05-21 23:46:18 +00:00
|
|
|
|
|
|
|
install(TARGETS hello
|
2018-08-23 21:03:28 +00:00
|
|
|
LIBRARY DESTINATION "${Wireshark_PLUGIN_INSTALL_DIR}/epan" NAMELINK_SKIP
|
2018-05-21 23:46:18 +00:00
|
|
|
)
|