diff --git a/CMakeLists.txt b/CMakeLists.txt index a5f2b25eb9..51a5d577bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1834,12 +1834,6 @@ configure_file(${CMAKE_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_BINARY_DIR}/config.h configure_file(${CMAKE_SOURCE_DIR}/ws_version.h.in ${CMAKE_BINARY_DIR}/ws_version.h) -set( prefix "${CMAKE_INSTALL_PREFIX}" ) -set( exec_prefix "\${prefix}" ) -set( libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}" ) -set( includedir "\${prefix}/include" ) -set( plugindir "\${libdir}/wireshark/${PLUGIN_VERSION_DIR}" ) - # Doxygen variables file(GLOB TOP_LEVEL_SOURCE_LIST *.c *.cpp *.h) string (REPLACE ";" " " DOXYGEN_TOP_LEVEL_SOURCES "${TOP_LEVEL_SOURCE_LIST}") @@ -1848,7 +1842,6 @@ set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CFG_OUT_FILES doxygen.cfg - epan/wireshark.pc packaging/macosx/osx-app.sh packaging/macosx/osx-dmg.sh packaging/macosx/wireshark-app.dmgbuild @@ -1860,6 +1853,7 @@ set(CFG_OUT_FILES resources/libwiretap.rc resources/libwsutil.rc resources/wireshark.exe.manifest + resources/wireshark.pc resources/wireshark.rc ) @@ -4069,6 +4063,12 @@ if(BUILD_logray AND QT_FOUND AND NOT APPLE AND (NOT WIN32 OR USE_MSYSTEM)) RENAME org.wireshark.Logray.svg) endif() +install(FILES "${CMAKE_BINARY_DIR}/resources/wireshark.pc" + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig + COMPONENT "Development" + EXCLUDE_FROM_ALL +) + install( DIRECTORY ${INSTALL_DIRS} diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 58361d2330..e751f5cbf5 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -397,12 +397,6 @@ install(FILES ${LIBWIRESHARK_PUBLIC_HEADERS} EXCLUDE_FROM_ALL ) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/wireshark.pc" - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig - COMPONENT "Development" - EXCLUDE_FROM_ALL -) - add_executable(exntest EXCLUDE_FROM_ALL exntest.c except.c) target_link_libraries(exntest epan) set_target_properties(exntest PROPERTIES diff --git a/epan/wireshark.pc.in b/resources/wireshark.pc.in similarity index 55% rename from epan/wireshark.pc.in rename to resources/wireshark.pc.in index 55b4f935cb..9bff7820c9 100644 --- a/epan/wireshark.pc.in +++ b/resources/wireshark.pc.in @@ -1,9 +1,9 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ sharedlibdir=${libdir} -plugindir=@plugindir@ +plugindir=${libdir}/wireshark/@PLUGIN_VERSION_DIR@ Name: Wireshark Description: Network Packet Dissection Library