diff options
author | Peter Wu <peter@lekensteyn.nl> | 2017-01-10 14:03:55 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2017-01-10 17:09:29 +0000 |
commit | 37790e90f52b4c08d2a5dd8c4ff0e0cab4913880 (patch) | |
tree | b9707183f69341f02fa5dd73117510bd786fc746 /CMakeLists.txt | |
parent | 0ecfc7280cf3d793a754722b27692216e5a2986f (diff) | |
download | wireshark-37790e90f52b4c08d2a5dd8c4ff0e0cab4913880.tar.gz |
cmake: fix empty data (Global Configuration) directory
Color filters were somehow not loaded. It turns out that the
BUILD_TIME_DATAFILE_DIR macro (for filesystem.c) was empty because
DATAFILE_DIR was defined after adding the wsutil directory. Fix it by
defining the variable before wsutil (but after epan).
Change-Id: I0d002b79499c80a90d8fcc14b06ced26c30b0453
Fixes: v2.3.0rc0-1830-gd5fdbef7f4 ("cmake,wslua,wsutil: load files from run/ instead of source tree")
Reviewed-on: https://code.wireshark.org/review/19600
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5aaedbf7de..7038e7acbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1153,6 +1153,22 @@ add_subdirectory( tools/lemon ) add_subdirectory( ui ) add_subdirectory( wiretap ) add_subdirectory( writecap ) + +# Location of our data files. This should be set to a value that allows +# running from the build directory on Windows, on OS X when building an +# application bundle, and on UNIX if WIRESHARK_RUN_FROM_BUILD_DIRECTORY +# is set. +if(ENABLE_APPLICATION_BUNDLE) + set(_datafile_dir "${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Resources/share/wireshark") +else() + get_target_property(_libwireshark_location epan LOCATION) + get_filename_component(_datafile_dir "${_libwireshark_location}" PATH) +endif() + +set(DATAFILE_DIR ${_datafile_dir} CACHE INTERNAL "Build time data file location.") + +# wsutil must be added after DATAFILE_DIR is set such that filesystem.c can +# learn about the directory location. add_subdirectory( wsutil ) if(NOT WIN32) @@ -1171,19 +1187,6 @@ if(BUILD_wireshark AND QT_FOUND) add_subdirectory( ui/qt ) endif() -# Location of our data files. This should be set to a value that allows -# running from the build directory on Windows, on OS X when building an -# application bundle, and on UNIX if WIRESHARK_RUN_FROM_BUILD_DIRECTORY -# is set. -if(ENABLE_APPLICATION_BUNDLE) - set(_datafile_dir "${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Resources/share/wireshark") -else() - get_target_property(_libwireshark_location epan LOCATION) - get_filename_component(_datafile_dir "${_libwireshark_location}" PATH) -endif() - -set(DATAFILE_DIR ${_datafile_dir} CACHE INTERNAL "Build time data file location.") - if(ENABLE_EXTCAP) # Target platform locations # UNIX, Linux, non-bundled OS X: $DESTDIR/lib/wireshark/extcap |