From 524a8e54e0ceb2eb77fe9094f9a696f5e7b814a0 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Thu, 10 Jan 2019 15:37:23 -0800 Subject: [PATCH] Can create nitpick installer. --- cmake/macros/SetPackagingParameters.cmake | 2 ++ tools/nitpick/CMakeLists.txt | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/cmake/macros/SetPackagingParameters.cmake b/cmake/macros/SetPackagingParameters.cmake index 1b7243d4f2..376686a5c9 100644 --- a/cmake/macros/SetPackagingParameters.cmake +++ b/cmake/macros/SetPackagingParameters.cmake @@ -162,8 +162,10 @@ macro(SET_PACKAGING_PARAMETERS) else () if (WIN32) set(CONSOLE_INSTALL_DIR "server-console") + set(NITPICK_INSTALL_DIR "nitpick") else () set(CONSOLE_INSTALL_DIR ".") + set(NITPICK_INSTALL_DIR ".") endif () set(COMPONENT_INSTALL_DIR ".") diff --git a/tools/nitpick/CMakeLists.txt b/tools/nitpick/CMakeLists.txt index efb5125f69..46fde9d33f 100644 --- a/tools/nitpick/CMakeLists.txt +++ b/tools/nitpick/CMakeLists.txt @@ -73,3 +73,20 @@ elseif (APPLE) ) endif () +# set the packaged console folder depending on platform, so we can copy it +if (WIN32) + set(PACKAGED_NITPICK_FOLDER "Release") +endif () + +if (WIN32) + set(NITPICK_DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/${PACKAGED_NITPICK_FOLDER}") + + install( + DIRECTORY "${NITPICK_DESTINATION}/" + DESTINATION ${NITPICK_INSTALL_DIR} + ) + + # sign the copied server console executable after install + set(EXECUTABLE_PATH "${NITPICK_DESTINATION}/${NITPICK_EXEC_NAME}") + optional_win_executable_signing() +endif() \ No newline at end of file