aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2019-02-01 16:25:24 +0000
committerJoão Valverde <j@v6e.pt>2019-02-02 16:53:49 +0000
commitc2eddffb84e7b7c9f8c001d74f8e9c845687bcce (patch)
treec175d3167d0c6d3a90cd09f71cd4cccd1f869966
parent16e20ccec7e54c57a5c1d0593da9185eaf497640 (diff)
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>
-rw-r--r--CMakeLists.txt36
-rw-r--r--codecs/CMakeLists.txt2
-rw-r--r--epan/CMakeLists.txt2
-rw-r--r--epan/dfilter/CMakeLists.txt2
-rw-r--r--epan/dissectors/CMakeLists.txt2
-rw-r--r--epan/ftypes/CMakeLists.txt2
-rw-r--r--epan/wmem/CMakeLists.txt2
-rw-r--r--wiretap/CMakeLists.txt2
-rw-r--r--wsutil/CMakeLists.txt2
9 files changed, 27 insertions, 25 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f82e52753c..78485ab72d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,14 @@ endif()
if(POLICY CMP0083)
cmake_policy(SET CMP0083 NEW)
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
set(GIT_REVISION 0)
@@ -33,13 +40,6 @@ endif()
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}")
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
# run/Release. We try to set DATAFILE_DIR to actual location below.
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.")
endif()
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.")
endif()
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.")
endif()
@@ -169,12 +169,14 @@ if(WIN32)
else()
# By default INSTALL_DATADIR is set to INSTALL_DATAROOTDIR, set the
# 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"
)
endif()
include(GNUInstallDirs)
+set(PROJECT_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}")
+
# Make sure our executables can can load our libraries if we install into
# a non-default directory on Unix-like systems other than macOS.
# https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling
@@ -1255,14 +1257,14 @@ include( UseCheckAPI )
if (WIN32)
set(EXTCAP_INSTALL_LIBDIR "extcap" CACHE INTERNAL "The extcap dir")
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()
# Directory where plugins and Lua dissectors can be found.
if(WIN32)
set(PLUGIN_INSTALL_LIBDIR "plugins" CACHE INTERNAL "The plugin dir")
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()
set(PLUGIN_INSTALL_VERSION_LIBDIR "${PLUGIN_INSTALL_LIBDIR}/${PROJECT_RELEASE_VERSION}")
set(PLUGIN_VERSION_DIR "plugins/${PROJECT_RELEASE_VERSION}")
@@ -2743,7 +2745,7 @@ if(RPMBUILD_EXECUTABLE)
)
# 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(
OUTPUT "${CMAKE_BINARY_DIR}/packaging/rpm/SOURCES/${_export_tarball}"
COMMAND ${CMAKE_BINARY_DIR}/packaging/source/git-export-release.sh
@@ -2878,7 +2880,7 @@ set(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.
@@ -2937,7 +2939,7 @@ if(WIN32)
# path (incorrect relative path computation).
set(WIRESHARK_INSTALL_CMAKEDIR "cmake")
else()
- set(WIRESHARK_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/${CPACK_PACKAGE_NAME}/cmake")
+ set(WIRESHARK_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake")
endif()
install(
diff --git a/codecs/CMakeLists.txt b/codecs/CMakeLists.txt
index bf88244108..f46cabc96e 100644
--- a/codecs/CMakeLists.txt
+++ b/codecs/CMakeLists.txt
@@ -79,7 +79,7 @@ install(TARGETS wscodecs
)
install(FILES ${WSCODECS_PUBLIC_HEADERS}
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/codecs"
+ DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/codecs"
)
CHECKAPI(
diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt
index 5afdacd966..2135d84153 100644
--- a/epan/CMakeLists.txt
+++ b/epan/CMakeLists.txt
@@ -407,7 +407,7 @@ install(TARGETS epan
)
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)
diff --git a/epan/dfilter/CMakeLists.txt b/epan/dfilter/CMakeLists.txt
index a0a1809f33..14fcd63a6a 100644
--- a/epan/dfilter/CMakeLists.txt
+++ b/epan/dfilter/CMakeLists.txt
@@ -66,7 +66,7 @@ set_target_properties(dfilter PROPERTIES
)
install(FILES ${DFILTER_PUBLIC_HEADERS}
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/epan/dfilter"
+ DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/epan/dfilter"
)
CHECKAPI(
diff --git a/epan/dissectors/CMakeLists.txt b/epan/dissectors/CMakeLists.txt
index 23a9cf07dd..71665036df 100644
--- a/epan/dissectors/CMakeLists.txt
+++ b/epan/dissectors/CMakeLists.txt
@@ -1975,7 +1975,7 @@ set_target_properties(dissectors PROPERTIES
)
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")
diff --git a/epan/ftypes/CMakeLists.txt b/epan/ftypes/CMakeLists.txt
index 61cbf1ae7a..606eccdd97 100644
--- a/epan/ftypes/CMakeLists.txt
+++ b/epan/ftypes/CMakeLists.txt
@@ -50,7 +50,7 @@ set_target_properties(ftypes PROPERTIES
)
install(FILES ${FTYPE_PUBLIC_HEADERS}
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/epan/ftypes"
+ DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/epan/ftypes"
)
CHECKAPI(
diff --git a/epan/wmem/CMakeLists.txt b/epan/wmem/CMakeLists.txt
index 2ff6d717d5..98d96424c2 100644
--- a/epan/wmem/CMakeLists.txt
+++ b/epan/wmem/CMakeLists.txt
@@ -75,7 +75,7 @@ set_target_properties(wmem_test PROPERTIES
)
install(FILES ${WMEM_PUBLIC_HEADERS}
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/epan/wmem"
+ DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/epan/wmem"
)
CHECKAPI(
diff --git a/wiretap/CMakeLists.txt b/wiretap/CMakeLists.txt
index 269129702a..ec3ce85be6 100644
--- a/wiretap/CMakeLists.txt
+++ b/wiretap/CMakeLists.txt
@@ -152,7 +152,7 @@ install(TARGETS wiretap
)
install(FILES ${WIRETAP_PUBLIC_HEADERS}
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/wiretap"
+ DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/wiretap"
)
CHECKAPI(
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index 03868f707f..555d99f6a8 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -289,7 +289,7 @@ install(TARGETS wsutil
)
install(FILES ${WSUTIL_PUBLIC_HEADERS}
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/wsutil"
+ DESTINATION "${PROJECT_INSTALL_INCLUDEDIR}/wsutil"
)
CHECKAPI(