forked from osmocom/wireshark
CMake: Fix DOCDIR on Unix
User guides are installed to doc/Wireshark. Use doc/wireshark instead. Remove leftover variable CPACK_PACKAGE_NAME. Change-Id: I9a1d6bdc7d8f0b48c61e43679285d5ba83904a63 Reviewed-on: https://code.wireshark.org/review/31851 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
parent
16e20ccec7
commit
c2eddffb84
|
@ -16,7 +16,14 @@ endif()
|
||||||
if(POLICY CMP0083)
|
if(POLICY CMP0083)
|
||||||
cmake_policy(SET CMP0083 NEW)
|
cmake_policy(SET CMP0083 NEW)
|
||||||
endif()
|
endif()
|
||||||
project(Wireshark C CXX)
|
|
||||||
|
if(WIN32)
|
||||||
|
set(_project_name Wireshark)
|
||||||
|
else()
|
||||||
|
set(_project_name wireshark)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
project(${_project_name} C CXX)
|
||||||
|
|
||||||
# Updated by tools/make-version.pl
|
# Updated by tools/make-version.pl
|
||||||
set(GIT_REVISION 0)
|
set(GIT_REVISION 0)
|
||||||
|
@ -33,13 +40,6 @@ endif()
|
||||||
|
|
||||||
set(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}${PROJECT_VERSION_EXTENSION}")
|
set(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}.${PROJECT_PATCH_VERSION}${PROJECT_VERSION_EXTENSION}")
|
||||||
|
|
||||||
# packaging information
|
|
||||||
if(WIN32)
|
|
||||||
set(CPACK_PACKAGE_NAME Wireshark)
|
|
||||||
else()
|
|
||||||
set(CPACK_PACKAGE_NAME wireshark)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
|
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
|
||||||
|
|
||||||
message(STATUS "Generating build using CMake ${CMAKE_VERSION}")
|
message(STATUS "Generating build using CMake ${CMAKE_VERSION}")
|
||||||
|
@ -141,15 +141,15 @@ message(STATUS "CMake build type: ${CMAKE_BUILD_TYPE}")
|
||||||
# files might end up in a configuration subdirectory, e.g. run/Debug or
|
# files might end up in a configuration subdirectory, e.g. run/Debug or
|
||||||
# run/Release. We try to set DATAFILE_DIR to actual location below.
|
# run/Release. We try to set DATAFILE_DIR to actual location below.
|
||||||
if(NOT ARCHIVE_OUTPUT_PATH)
|
if(NOT ARCHIVE_OUTPUT_PATH)
|
||||||
set(ARCHIVE_OUTPUT_PATH ${Wireshark_BINARY_DIR}/run CACHE INTERNAL
|
set(ARCHIVE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/run CACHE INTERNAL
|
||||||
"Single output directory for building all archives.")
|
"Single output directory for building all archives.")
|
||||||
endif()
|
endif()
|
||||||
if(NOT EXECUTABLE_OUTPUT_PATH)
|
if(NOT EXECUTABLE_OUTPUT_PATH)
|
||||||
set(EXECUTABLE_OUTPUT_PATH ${Wireshark_BINARY_DIR}/run CACHE INTERNAL
|
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/run CACHE INTERNAL
|
||||||
"Single output directory for building all executables.")
|
"Single output directory for building all executables.")
|
||||||
endif()
|
endif()
|
||||||
if(NOT LIBRARY_OUTPUT_PATH)
|
if(NOT LIBRARY_OUTPUT_PATH)
|
||||||
set(LIBRARY_OUTPUT_PATH ${Wireshark_BINARY_DIR}/run CACHE INTERNAL
|
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/run CACHE INTERNAL
|
||||||
"Single output directory for building all libraries.")
|
"Single output directory for building all libraries.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -169,12 +169,14 @@ if(WIN32)
|
||||||
else()
|
else()
|
||||||
# By default INSTALL_DATADIR is set to INSTALL_DATAROOTDIR, set the
|
# By default INSTALL_DATADIR is set to INSTALL_DATAROOTDIR, set the
|
||||||
# proper value here.
|
# proper value here.
|
||||||
set(CMAKE_INSTALL_DATADIR "share/${CPACK_PACKAGE_NAME}"
|
set(CMAKE_INSTALL_DATADIR "share/${PROJECT_NAME}"
|
||||||
CACHE PATH "Read-only architecture-independent data"
|
CACHE PATH "Read-only architecture-independent data"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
set(PROJECT_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}")
|
||||||
|
|
||||||
# Make sure our executables can can load our libraries if we install into
|
# Make sure our executables can can load our libraries if we install into
|
||||||
# a non-default directory on Unix-like systems other than macOS.
|
# a non-default directory on Unix-like systems other than macOS.
|
||||||
# https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
|
# https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
|
||||||
|
@ -1255,14 +1257,14 @@ include( UseCheckAPI )
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(EXTCAP_INSTALL_LIBDIR "extcap" CACHE INTERNAL "The extcap dir")
|
set(EXTCAP_INSTALL_LIBDIR "extcap" CACHE INTERNAL "The extcap dir")
|
||||||
else ()
|
else ()
|
||||||
set(EXTCAP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/extcap" CACHE INTERNAL "The extcap dir")
|
set(EXTCAP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extcap" CACHE INTERNAL "The extcap dir")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Directory where plugins and Lua dissectors can be found.
|
# Directory where plugins and Lua dissectors can be found.
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(PLUGIN_INSTALL_LIBDIR "plugins" CACHE INTERNAL "The plugin dir")
|
set(PLUGIN_INSTALL_LIBDIR "plugins" CACHE INTERNAL "The plugin dir")
|
||||||
else()
|
else()
|
||||||
set(PLUGIN_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/plugins" CACHE INTERNAL "The plugin dir")
|
set(PLUGIN_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/plugins" CACHE INTERNAL "The plugin dir")
|
||||||
endif()
|
endif()
|
||||||
set(PLUGIN_INSTALL_VERSION_LIBDIR "${PLUGIN_INSTALL_LIBDIR}/${PROJECT_RELEASE_VERSION}")
|
set(PLUGIN_INSTALL_VERSION_LIBDIR "${PLUGIN_INSTALL_LIBDIR}/${PROJECT_RELEASE_VERSION}")
|
||||||
set(PLUGIN_VERSION_DIR "plugins/${PROJECT_RELEASE_VERSION}")
|
set(PLUGIN_VERSION_DIR "plugins/${PROJECT_RELEASE_VERSION}")
|
||||||
|
@ -2743,7 +2745,7 @@ if(RPMBUILD_EXECUTABLE)
|
||||||
)
|
)
|
||||||
|
|
||||||
# XXX Replace with the "dist" target?
|
# XXX Replace with the "dist" target?
|
||||||
set(_export_tarball "${CPACK_PACKAGE_NAME}-${VERSION}.tar.xz")
|
set(_export_tarball "${PROJECT_NAME}-${VERSION}.tar.xz")
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${CMAKE_BINARY_DIR}/packaging/rpm/SOURCES/${_export_tarball}"
|
OUTPUT "${CMAKE_BINARY_DIR}/packaging/rpm/SOURCES/${_export_tarball}"
|
||||||
COMMAND ${CMAKE_BINARY_DIR}/packaging/source/git-export-release.sh
|
COMMAND ${CMAKE_BINARY_DIR}/packaging/source/git-export-release.sh
|
||||||
|
@ -2878,7 +2880,7 @@ set(SHARK_PUBLIC_HEADERS
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${SHARK_PUBLIC_HEADERS}
|
install(FILES ${SHARK_PUBLIC_HEADERS}
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}
|
DESTINATION ${PROJECT_INSTALL_INCLUDEDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Install icons and other desktop files for Freedesktop.org-compliant desktops.
|
# Install icons and other desktop files for Freedesktop.org-compliant desktops.
|
||||||
|
@ -2937,7 +2939,7 @@ if(WIN32)
|
||||||
# path (incorrect relative path computation).
|
# path (incorrect relative path computation).
|
||||||
set(WIRESHARK_INSTALL_CMAKEDIR "cmake")
|
set(WIRESHARK_INSTALL_CMAKEDIR "cmake")
|
||||||
else()
|
else()
|
||||||
set(WIRESHARK_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/cmake")
|
set(WIRESHARK_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(
|
install(
|
||||||
|
|
|
@ -79,7 +79,7 @@ install(TARGETS wscodecs
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${WSCODECS_PUBLIC_HEADERS}
|
install(FILES ${WSCODECS_PUBLIC_HEADERS}
|
||||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/codecs"
|
DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/codecs"
|
||||||
)
|
)
|
||||||
|
|
||||||
CHECKAPI(
|
CHECKAPI(
|
||||||
|
|
|
@ -407,7 +407,7 @@ install(TARGETS epan
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${LIBWIRESHARK_PUBLIC_HEADERS}
|
install(FILES ${LIBWIRESHARK_PUBLIC_HEADERS}
|
||||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/epan"
|
DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/epan"
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(exntest EXCLUDE_FROM_ALL exntest.c except.c)
|
add_executable(exntest EXCLUDE_FROM_ALL exntest.c except.c)
|
||||||
|
|
|
@ -66,7 +66,7 @@ set_target_properties(dfilter PROPERTIES
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${DFILTER_PUBLIC_HEADERS}
|
install(FILES ${DFILTER_PUBLIC_HEADERS}
|
||||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/epan/dfilter"
|
DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/epan/dfilter"
|
||||||
)
|
)
|
||||||
|
|
||||||
CHECKAPI(
|
CHECKAPI(
|
||||||
|
|
|
@ -1975,7 +1975,7 @@ set_target_properties(dissectors PROPERTIES
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${DISSECTOR_PUBLIC_HEADERS}
|
install(FILES ${DISSECTOR_PUBLIC_HEADERS}
|
||||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/epan/dissectors"
|
DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/epan/dissectors"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CHECKAPI_FILE_LIST "${CMAKE_CURRENT_BINARY_DIR}/files.txt")
|
set(CHECKAPI_FILE_LIST "${CMAKE_CURRENT_BINARY_DIR}/files.txt")
|
||||||
|
|
|
@ -50,7 +50,7 @@ set_target_properties(ftypes PROPERTIES
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${FTYPE_PUBLIC_HEADERS}
|
install(FILES ${FTYPE_PUBLIC_HEADERS}
|
||||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/epan/ftypes"
|
DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/epan/ftypes"
|
||||||
)
|
)
|
||||||
|
|
||||||
CHECKAPI(
|
CHECKAPI(
|
||||||
|
|
|
@ -75,7 +75,7 @@ set_target_properties(wmem_test PROPERTIES
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${WMEM_PUBLIC_HEADERS}
|
install(FILES ${WMEM_PUBLIC_HEADERS}
|
||||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/epan/wmem"
|
DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/epan/wmem"
|
||||||
)
|
)
|
||||||
|
|
||||||
CHECKAPI(
|
CHECKAPI(
|
||||||
|
|
|
@ -152,7 +152,7 @@ install(TARGETS wiretap
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${WIRETAP_PUBLIC_HEADERS}
|
install(FILES ${WIRETAP_PUBLIC_HEADERS}
|
||||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/wiretap"
|
DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/wiretap"
|
||||||
)
|
)
|
||||||
|
|
||||||
CHECKAPI(
|
CHECKAPI(
|
||||||
|
|
|
@ -289,7 +289,7 @@ install(TARGETS wsutil
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${WSUTIL_PUBLIC_HEADERS}
|
install(FILES ${WSUTIL_PUBLIC_HEADERS}
|
||||||
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/wsutil"
|
DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/wsutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
CHECKAPI(
|
CHECKAPI(
|
||||||
|
|
Loading…
Reference in New Issue