summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-12-04 09:02:35 -0800
committerGerald Combs <gerald@wireshark.org>2015-12-04 22:32:32 +0000
commit42333aa353515ccbb68c6e74109cd34a34d1abe6 (patch)
treeb014ccf8e065a0a482a7204c424e148db6f6634d /cmake
parent4b206d1b06f829bcfe3268fd166d5500ae5e3aaf (diff)
downloadwireshark-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 'cmake')
-rw-r--r--cmake/modules/FindMSVC_REDIST.cmake23
-rw-r--r--cmake/modules/FindNSIS.cmake3
2 files changed, 23 insertions, 3 deletions
diff --git a/cmake/modules/FindMSVC_REDIST.cmake b/cmake/modules/FindMSVC_REDIST.cmake
new file mode 100644
index 0000000000..2d1237b37d
--- /dev/null
+++ b/cmake/modules/FindMSVC_REDIST.cmake
@@ -0,0 +1,23 @@
+#
+# Find the Microsoft Visual C++ library DLLs.
+# These are included with the full frontal (Professional, Enterprise) editions
+# of Visual Studio but not Express.
+#
+# MSVCR_DLL - Path to the redistributable DLLs.
+#
+
+set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
+include(InstallRequiredSystemLibraries)
+
+# CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS will likely give us a list of DLL
+# paths containing spaces. We'll assume that they're all in the same
+# directory and use it to create something that's easier to pass to
+# NSIS.
+
+set(MSVCR_DLL)
+list(GET CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS 0 _msvcr_dll)
+if(_msvcr_dll)
+ get_filename_component(_msvcr_dir ${_msvcr_dll} DIRECTORY)
+ set(MSVCR_DLL "${_msvcr_dir}/*.*")
+ file(TO_NATIVE_PATH "${MSVCR_DLL}" MSVCR_DLL)
+endif()
diff --git a/cmake/modules/FindNSIS.cmake b/cmake/modules/FindNSIS.cmake
index 250104c274..5429ac681b 100644
--- a/cmake/modules/FindNSIS.cmake
+++ b/cmake/modules/FindNSIS.cmake
@@ -10,6 +10,3 @@ find_program(MAKENSIS_EXECUTABLE makensis
PATH "$ENV{PROGRAMFILES}/NSIS" "$ENV{PROGRAMW6432}/NSIS"
DOC "Path to the makensis utility."
)
-
-set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
-include(InstallRequiredSystemLibraries)