diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-12-04 09:02:35 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-12-04 22:32:32 +0000 |
commit | 42333aa353515ccbb68c6e74109cd34a34d1abe6 (patch) | |
tree | b014ccf8e065a0a482a7204c424e148db6f6634d /packaging/portableapps | |
parent | 4b206d1b06f829bcfe3268fd166d5500ae5e3aaf (diff) | |
download | wireshark-42333aa353515ccbb68c6e74109cd34a34d1abe6.tar.gz |
CMake+PortableApps: Include the VC runtime (second try).
Move the code that finds the Visual C++ redistributable DLLs to its
own module. Run it before we create our NSIS and PortableApps targets.
Add a PortableApps target that copies the redistributable
This reverts commit 403fa9fbe0cdba3f443ec4674cda40092525ffe4.
Bug: 11800
Change-Id: I081d8fd3f5f37dd590659ca8f2bd309642a9a9df
Reviewed-on: https://code.wireshark.org/review/12431
Reviewed-by: Gerald Combs <gerald@wireshark.org>
(cherry picked from commit 5b580834aeeee8477039bc099c49c21aeeb3b71f)
Reviewed-on: https://code.wireshark.org/review/12432
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Diffstat (limited to 'packaging/portableapps')
-rw-r--r-- | packaging/portableapps/CMakeLists.txt | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/packaging/portableapps/CMakeLists.txt b/packaging/portableapps/CMakeLists.txt index 38c428598d..5753d34609 100644 --- a/packaging/portableapps/CMakeLists.txt +++ b/packaging/portableapps/CMakeLists.txt @@ -21,7 +21,6 @@ # To do: # - Use CPack to generate the PortableApps package. -# - Copy the C runtime DLLs if they're available. set(PORTABLEAPPS_NAME "${CMAKE_PROJECT_NAME}Portable") set(PORTABLEAPPS_NAME ${PORTABLEAPPS_NAME} PARENT_SCOPE) @@ -46,6 +45,7 @@ macro( ADD_PORTABLEAPPS_PACKAGE_TARGET ) file(TO_NATIVE_PATH "${_portableapps_app_dir}" _portableapps_app_dir_native) file(TO_NATIVE_PATH "${DATAFILE_DIR}" _datafile_dir_native) file(TO_NATIVE_PATH "${CMAKE_SOURCE_DIR}/packaging/portableapps/xcopy-deploy-exclude.txt" _xcopy_deploy_exclude) + add_custom_target(portableapps_app_dir # We "Deploy using XCopy," which is described at # https://msdn.microsoft.com/en-us/library/ms235291.aspx @@ -53,16 +53,29 @@ macro( ADD_PORTABLEAPPS_PACKAGE_TARGET ) COMMAND ${CMAKE_COMMAND} -E remove_directory ${_portableapps_app_dir} COMMAND ${CMAKE_COMMAND} -E make_directory ${_portableapps_app_dir} COMMAND xcopy ${_datafile_dir_native} ${_portableapps_app_dir_native} /D /I /E /Y /exclude:${_xcopy_deploy_exclude} - # XXX Copy C runtime DLLs. ) + set_target_properties(portableapps_app_dir PROPERTIES FOLDER "Packaging") + if(MSVCR_DLL) + add_custom_target(portableapps_runtime + COMMAND xcopy "${MSVCR_DLL}" ${_portableapps_app_dir_native} /D /I /Y + ) + else(MSVCR_DLL) + add_custom_target(portableapps_runtime + COMMAND ${CMAKE_COMMAND} -E echo "C Runtime MUST be installed on target system." + ) + endif(MSVCR_DLL) + + set_target_properties(portableapps_runtime PROPERTIES FOLDER "Packaging") + add_dependencies(portableapps_runtime portableapps_app_dir) + # Build the PortableApps package. # nsis_package_prep must be built prior to this. set (_portableapps_package ${CMAKE_BINARY_DIR}/packaging/portableapps/WiresharkPortable_$(VERSION).exe) add_custom_target(portableapps_package DEPENDS - portableapps_app_dir + portableapps_runtime ${_portableapps_package} ) set_target_properties(portableapps_package PROPERTIES FOLDER "Packaging") |