aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/tpg
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2015-01-18 13:27:13 -0800
committerGerald Combs <gerald@wireshark.org>2015-01-20 16:12:20 +0000
commit6e6a1291d0b36fe97d0f684e1abdfe546aaeae7f (patch)
treee441c514c057d4cadd74ae21ec6cc321b63ef285 /plugins/tpg
parentaf3924a333aa8fc614ad45163751a614a9b9fc3d (diff)
CMake: Set an output directory for plugins.
Redefine PLUGIN_DIR similar to DATAFILE_DIR and use it on all platforms. Add WiresharkPlugin.cmake so that we can start defining common macros for plugins/*/CMakeLists.txt. Load plugins in out-of-tree builds. Change-Id: I8c1359ed3cf8a71788b8320ff89dfe2d3969def2 Reviewed-on: https://code.wireshark.org/review/6640 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'plugins/tpg')
-rw-r--r--plugins/tpg/CMakeLists.txt25
1 files changed, 6 insertions, 19 deletions
diff --git a/plugins/tpg/CMakeLists.txt b/plugins/tpg/CMakeLists.txt
index 91c1f7a6cd..d28f97a298 100644
--- a/plugins/tpg/CMakeLists.txt
+++ b/plugins/tpg/CMakeLists.txt
@@ -19,6 +19,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
+include(WiresharkPlugin)
+
+# XXX No moduleinfo.nmake
+# set_plugin_properties(tpg ...)
+
set(PLUGIN_FILES
http-parser.c
packet-http.c
@@ -67,28 +72,10 @@ ADD_CUSTOM_COMMAND(
${CMAKE_CURRENT_SOURCE_DIR}/http.tpg
)
-add_library(tpg ${LINK_MODE_MODULE}
- ${PLUGIN_FILES}
- plugin.rc
-)
-
-set_target_properties(tpg PROPERTIES
- PREFIX ""
- LINK_FLAGS "${WS_LINK_FLAGS}"
- FOLDER "Plugins"
-)
-
-if(ENABLE_APPLICATION_BUNDLE)
- set_target_properties(tpg PROPERTIES
- LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/PlugIns/wireshark
- )
-endif()
-
-target_link_libraries(tpg epan)
+add_plugin_library(tpg)
install(TARGETS tpg
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}
)
-