aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2018-08-21 22:23:46 +0100
committerJoão Valverde <j@v6e.pt>2018-08-21 23:06:38 +0000
commit450ff674a6e84c3abebff76a470d72114083f27f (patch)
tree01851751df55f7524e2c51dfb22a853616ca649a
parent2e7cae3fd46fd506006d94ee8b79ca4f883b50c7 (diff)
CMake: Clean up plugin dirs
Change-Id: Ie41366205db19b8a9714ad5259c3f958e1e9ee95 Reviewed-on: https://code.wireshark.org/review/29233 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
-rw-r--r--CMakeLists.txt14
-rw-r--r--cmake/modules/WiresharkConfig.cmake.in3
-rw-r--r--cmakeconfig.h.in3
-rw-r--r--extcap/CMakeLists.txt14
-rw-r--r--wsutil/CMakeLists.txt3
5 files changed, 17 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5afb3a54b4..76746e00ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1278,9 +1278,9 @@ include( UseCheckAPI )
# Windows: $DESTDIR/extcap
# macOS app bundle: Wireshark.app/Contents/Resources/share/wireshark/extcap
if (WIN32)
- set(EXTCAP_DIR "extcap" CACHE INTERNAL "The extcap dir")
+ set(EXTCAP_INSTALL_LIBDIR "extcap" CACHE INTERNAL "The extcap dir")
else ()
- set(EXTCAP_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/${CPACK_PACKAGE_NAME}/extcap" CACHE INTERNAL "The extcap dir")
+ set(EXTCAP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/extcap" CACHE INTERNAL "The extcap dir")
endif()
add_subdirectory( capchild )
@@ -1331,12 +1331,10 @@ endif()
# Directory where plugins and Lua dissectors can be found.
set(PLUGIN_VERSION_DIR "plugins/${PROJECT_RELEASE_VERSION}")
-set(PLUGIN_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/${PLUGIN_VERSION_DIR}")
-# Used by the WiresharkConfig.cmake.in module
-if (WIN32)
- set(PLUGIN_INSTALL_DIR "${PLUGIN_VERSION_DIR}")
-else ()
- set(PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_LIBDIR}")
+if(WIN32)
+ set(PLUGIN_INSTALL_LIBDIR "${PLUGIN_VERSION_DIR}")
+else()
+ set(PLUGIN_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/${PLUGIN_VERSION_DIR}")
endif()
# Location of our plugins. PLUGIN_DIR should allow running
diff --git a/cmake/modules/WiresharkConfig.cmake.in b/cmake/modules/WiresharkConfig.cmake.in
index c3f4edfb6d..b3ef32f4aa 100644
--- a/cmake/modules/WiresharkConfig.cmake.in
+++ b/cmake/modules/WiresharkConfig.cmake.in
@@ -5,7 +5,8 @@ set(Wireshark_VERSION @PROJECT_MAJOR_VERSION@.@PROJECT_MINOR_VERSION@.@PROJECT_P
set(Wireshark_VERSION_STRING "@PROJECT_MAJOR_VERSION@.@PROJECT_MINOR_VERSION@.@PROJECT_PATCH_VERSION@")
set(Wireshark_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@")
-set(Wireshark_PLUGIN_INSTALL_DIR "@PLUGIN_INSTALL_DIR@")
+set(Wireshark_PLUGIN_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@/@PLUGIN_INSTALL_LIBDIR@")
+set(Wireshark_EXTCAP_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@/@EXTCAP_INSTALL_LIBDIR@")
set(Wireshark_LIB_DIR "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@")
set(Wireshark_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/wireshark")
diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in
index 65716b69c1..4a32408945 100644
--- a/cmakeconfig.h.in
+++ b/cmakeconfig.h.in
@@ -26,9 +26,6 @@
/* Build wsutil with SIMD optimization */
#cmakedefine HAVE_SSE4_2 1
-/* Directory where extcap hooks reside */
-#define EXTCAP_DIR "${EXTCAP_DIR}"
-
/* Define to 1 if we want to enable plugins */
#cmakedefine HAVE_PLUGINS 1
diff --git a/extcap/CMakeLists.txt b/extcap/CMakeLists.txt
index 0e8c95d69e..5ed2f7fcd3 100644
--- a/extcap/CMakeLists.txt
+++ b/extcap/CMakeLists.txt
@@ -99,7 +99,7 @@ if(BUILD_androiddump)
# XXX Shouldn't we add wsutil to androiddump_LIBS instead?
set_extcap_executable_properties(androiddump)
target_link_libraries(androiddump ${androiddump_LIBS})
- install(TARGETS androiddump RUNTIME DESTINATION ${EXTCAP_DIR})
+ install(TARGETS androiddump RUNTIME DESTINATION ${EXTCAP_INSTALL_LIBDIR})
add_dependencies(extcaps androiddump)
endif()
@@ -120,7 +120,7 @@ if(BUILD_sshdump AND LIBSSH_FOUND)
set_extcap_executable_properties(sshdump)
target_link_libraries(sshdump ${sshdump_LIBS})
target_include_directories(sshdump PUBLIC ${LIBSSH_INCLUDE_DIR})
- install(TARGETS sshdump RUNTIME DESTINATION ${EXTCAP_DIR})
+ install(TARGETS sshdump RUNTIME DESTINATION ${EXTCAP_INSTALL_LIBDIR})
add_dependencies(extcaps sshdump)
elseif (BUILD_sshdump)
#message( WARNING "Cannot find libssh, cannot build sshdump" )
@@ -144,7 +144,7 @@ if(BUILD_ciscodump AND LIBSSH_FOUND)
set_extcap_executable_properties(ciscodump)
target_link_libraries(ciscodump ${ciscodump_LIBS})
target_include_directories(ciscodump PUBLIC ${LIBSSH_INCLUDE_DIR})
- install(TARGETS ciscodump RUNTIME DESTINATION ${EXTCAP_DIR})
+ install(TARGETS ciscodump RUNTIME DESTINATION ${EXTCAP_INSTALL_LIBDIR})
add_dependencies(extcaps ciscodump)
elseif (BUILD_ciscodump)
#message( WARNING "Cannot find libssh, cannot build ciscodump" )
@@ -167,7 +167,7 @@ if(BUILD_dpauxmon AND HAVE_LIBNL3)
set_extcap_executable_properties(dpauxmon)
target_link_libraries(dpauxmon ${dpauxmon_LIBS})
target_include_directories(dpauxmon PUBLIC ${NL_INCLUDE_DIR})
- install(TARGETS dpauxmon RUNTIME DESTINATION ${EXTCAP_DIR})
+ install(TARGETS dpauxmon RUNTIME DESTINATION ${EXTCAP_INSTALL_LIBDIR})
add_dependencies(extcaps dpauxmon)
elseif (BUILD_dpauxmon)
#message( WARNING "Cannot find libnl3, cannot build dpauxmon" )
@@ -188,7 +188,7 @@ if(BUILD_udpdump)
add_executable(udpdump WIN32 ${udpdump_FILES})
set_extcap_executable_properties(udpdump)
target_link_libraries(udpdump ${udpdump_LIBS})
- install(TARGETS udpdump RUNTIME DESTINATION ${EXTCAP_DIR})
+ install(TARGETS udpdump RUNTIME DESTINATION ${EXTCAP_INSTALL_LIBDIR})
add_dependencies(extcaps udpdump)
endif()
@@ -210,7 +210,7 @@ if(BUILD_randpktdump)
# XXX Shouldn't we add wsutil to randpktdump_LIBS instead?
set_extcap_executable_properties(randpktdump)
target_link_libraries(randpktdump ${randpktdump_LIBS})
- install(TARGETS randpktdump RUNTIME DESTINATION ${EXTCAP_DIR})
+ install(TARGETS randpktdump RUNTIME DESTINATION ${EXTCAP_INSTALL_LIBDIR})
add_dependencies(extcaps randpktdump)
endif()
@@ -219,4 +219,4 @@ set(CLEAN_C_FILES
${androiddump_FILES}
${sshdump_FILES}
${ciscodump_FILES}
-) \ No newline at end of file
+)
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index 2d0478f6a6..7bae8b880c 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -10,7 +10,8 @@
include(UseABICheck)
if(NOT WIN32)
- add_definitions(-DPLUGIN_DIR=\"${CMAKE_INSTALL_FULL_LIBDIR}/wireshark/plugins\")
+ add_definitions(-DPLUGIN_DIR=\"${CMAKE_INSTALL_PREFIX}/${PLUGIN_INSTALL_LIBDIR}\")
+ add_definitions(-DEXTCAP_DIR=\"${CMAKE_INSTALL_PREFIX}/${EXTCAP_INSTALL_LIBDIR}\")
endif()
set(WSUTIL_PUBLIC_HEADERS