CMake: Move the PLUGIN_PATH_ID definition.

Define PLUGIN_PATH_ID where we use it. ENABLE_APPLICATION_BUNDLE is
defined later on, so test for APPLE instead.

Change-Id: I16c3ac3dc0e483fbf89cb1a2cacb2afb416d656f
Reviewed-on: https://code.wireshark.org/review/32016
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2019-02-13 16:12:24 -08:00
parent aedf6fe1c5
commit 1c27d782ba
1 changed files with 18 additions and 17 deletions

View File

@ -32,23 +32,6 @@ set(PROJECT_MINOR_VERSION 1)
set(PROJECT_PATCH_VERSION 0)
set(PROJECT_BUILD_VERSION ${GIT_REVISION})
set(PROJECT_VERSION_EXTENSION "")
if(ENABLE_APPLICATION_BUNDLE)
#
# As https://developer.apple.com/library/archive/technotes/tn2206/_index.html
# says,
#
# "Note that a location where code is expected to reside cannot generally
# contain directories full of nested code, because those directories tend
# to be interpreted as bundles. So this occasional practice is not
# recommended and not officially supported. If you do do this, do not use
# periods in the directory names. The code signing machinery interprets
# directories with periods in their names as code bundles and will reject
# them if they don't conform to the expected code bundle layout."
#
set(PLUGIN_PATH_ID "${PROJECT_MAJOR_VERSION}-${PROJECT_MINOR_VERSION}")
else(ENABLE_APPLICATION_BUNDLE)
set(PLUGIN_PATH_ID "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}")
endif(ENABLE_APPLICATION_BUNDLE)
if(DEFINED ENV{WIRESHARK_VERSION_EXTRA})
set(PROJECT_VERSION_EXTENSION "$ENV{WIRESHARK_VERSION_EXTRA}")
@ -1338,6 +1321,24 @@ else ()
set(EXTCAP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extcap" CACHE INTERNAL "The extcap dir")
endif()
if(APPLE)
#
# As https://developer.apple.com/library/archive/technotes/tn2206/_index.html
# says,
#
# "Note that a location where code is expected to reside cannot generally
# contain directories full of nested code, because those directories tend
# to be interpreted as bundles. So this occasional practice is not
# recommended and not officially supported. If you do do this, do not use
# periods in the directory names. The code signing machinery interprets
# directories with periods in their names as code bundles and will reject
# them if they don't conform to the expected code bundle layout."
#
set(PLUGIN_PATH_ID "${PROJECT_MAJOR_VERSION}-${PROJECT_MINOR_VERSION}")
else()
set(PLUGIN_PATH_ID "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}")
endif()
# Directory where plugins and Lua dissectors can be found.
if(WIN32)
set(PLUGIN_INSTALL_LIBDIR "plugins" CACHE INTERNAL "The plugin dir")