diff options
author | Gerald Combs <gerald@wireshark.org> | 2019-02-04 17:14:15 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2019-02-05 01:17:25 +0000 |
commit | 7f5c5e4ae7086448037423f61548bb7d9f48278c (patch) | |
tree | dd8226d30fb73a6573c7ac4bc9b4118f8122ebd5 | |
parent | 68efe641c8e93461820c63ad7ab54928309ec15b (diff) |
CMake: Fix config.nsh generation.
Make sure we always define VERSION_MINOR.
Change-Id: I4a79c6d25c1392834703d9ab3cbab2c0f9794ac5
Reviewed-on: https://code.wireshark.org/review/31886
Reviewed-by: Gerald Combs <gerald@wireshark.org>
(cherry picked from commit 2c77f8899ce145a41ede5e848c67ba6cdef31b47)
Reviewed-on: https://code.wireshark.org/review/31887
-rw-r--r-- | packaging/nsis/CMakeLists.txt | 1 | ||||
-rw-r--r-- | packaging/nsis/config.nsh.in | 50 |
2 files changed, 24 insertions, 27 deletions
diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt index 71b79a5c50..1a5a8aec9a 100644 --- a/packaging/nsis/CMakeLists.txt +++ b/packaging/nsis/CMakeLists.txt @@ -131,7 +131,6 @@ endif() # module, e.g. cmake/modules/configure_nsis_file.cmake. However we would # have to figure out a clean way to pass in the variables above. file(READ "${CMAKE_CURRENT_SOURCE_DIR}/config.nsh.in" _config_nsh_contents) -string(REPLACE "!define" "#cmakedefine" _config_nsh_contents "${_config_nsh_contents}") string(CONFIGURE "${_config_nsh_contents}" _config_nsh_contents) string(REPLACE "#define" "!define" _config_nsh_contents "${_config_nsh_contents}") string(REPLACE "#undef" "!undef" _config_nsh_contents "${_config_nsh_contents}") diff --git a/packaging/nsis/config.nsh.in b/packaging/nsis/config.nsh.in index 349b558e46..211c667982 100644 --- a/packaging/nsis/config.nsh.in +++ b/packaging/nsis/config.nsh.in @@ -5,29 +5,27 @@ # Do not prefix comments with ";". They will be removed by CMake. # MUST match "<Product ... Name=" in wix/Wireshark.wxs. -!define PROGRAM_NAME "@PROGRAM_NAME@" -!define TOP_SRC_DIR "@TOP_SRC_DIR@" -!define STAGING_DIR "@STAGING_DIR@" -!define WIRESHARK_TARGET_PLATFORM @WIRESHARK_TARGET_PLATFORM@ -!define TARGET_MACHINE @TARGET_MACHINE@ -!define WIRESHARK_LIB_DIR "@WIRESHARK_LIB_DIR@" -!define NPCAP_PACKAGE_VERSION @NPCAP_PACKAGE_VERSION@ -!define USBPCAP_PACKAGE_VERSION @USBPCAP_PACKAGE_VERSION@ -!define VERSION @VERSION@ -!define VERSION_MAJOR @VERSION_MAJOR@ -!define VERSION_MINOR @VERSION_MINOR@ -# CMake treats 0 as "false" and will undef zero values -!ifndef VERSION_MINOR -!define VERSION_MINOR 0 -!endif -!define PRODUCT_VERSION @PRODUCT_VERSION@ - -!define MMDBRESOLVE_EXE @MMDBRESOLVE_EXE@ - -!define VCREDIST_EXE "@VCREDIST_EXE@" - -!define USER_GUIDE_DIR "@USER_GUIDE_DIR@" - -!define SMI_DIR "@SMI_DIR@" - -!define QT_DIR "@QT_DIR@" +#define PROGRAM_NAME "@PROGRAM_NAME@" +#define TOP_SRC_DIR "@TOP_SRC_DIR@" +#define STAGING_DIR "@STAGING_DIR@" +#define WIRESHARK_TARGET_PLATFORM @WIRESHARK_TARGET_PLATFORM@ +#define TARGET_MACHINE @TARGET_MACHINE@ +#define WIRESHARK_LIB_DIR "@WIRESHARK_LIB_DIR@" +#define NPCAP_PACKAGE_VERSION @NPCAP_PACKAGE_VERSION@ +#define USBPCAP_PACKAGE_VERSION @USBPCAP_PACKAGE_VERSION@ +#define VERSION @VERSION@ +#define VERSION_MAJOR @VERSION_MAJOR@ +#define VERSION_MINOR @VERSION_MINOR@ +#define PRODUCT_VERSION @PRODUCT_VERSION@ + +#define VCREDIST_EXE "@VCREDIST_EXE@" + +# Optional components + +#cmakedefine MMDBRESOLVE_EXE @MMDBRESOLVE_EXE@ + +#cmakedefine USER_GUIDE_DIR "@USER_GUIDE_DIR@" + +#cmakedefine SMI_DIR "@SMI_DIR@" + +#cmakedefine QT_DIR "@QT_DIR@" |