Windows MSI: Let CMake install Shell Extensions WiX fragment to "msi/"
authorMichael Schuster <michael@schuster.ms>
Sat, 5 Sep 2020 02:39:05 +0000 (04:39 +0200)
committerMichael Schuster <michael@schuster.ms>
Mon, 21 Sep 2020 14:40:19 +0000 (16:40 +0200)
Signed-off-by: Michael Schuster <michael@schuster.ms>
shell_integration/windows/CMakeLists.txt
shell_integration/windows/WinShellExt.wxs.in

index d75d2574dbee46fac221bd47cb8436217e2c6a8a..e57f552ad8e1bf245c84d1aba4e63daa0d55d419 100644 (file)
@@ -7,9 +7,16 @@ include_directories(
     ${CMAKE_CURRENT_BINARY_DIR}
 )
 configure_file(WinShellExtConstants.h.in ${CMAKE_CURRENT_BINARY_DIR}/WinShellExtConstants.h)
-configure_file(WinShellExt.wxs.in ${CMAKE_CURRENT_BINARY_DIR}/WinShellExt.wxs)
 
 add_subdirectory(NCContextMenu)
 add_subdirectory(NCOverlays)
 add_subdirectory(NCUtil)
 
+if(BUILD_WIN_MSI)
+    configure_file(WinShellExt.wxs.in ${CMAKE_CURRENT_BINARY_DIR}/WinShellExt.wxs)
+
+    install(FILES
+        ${CMAKE_CURRENT_BINARY_DIR}/WinShellExt.wxs
+        DESTINATION msi/
+    )
+endif()
index 6ac42dca4b4a395b9d93134f6ae697c7479bec37..138258fb8bdd11d1b6c321645f5e391274f2e567 100644 (file)
@@ -14,7 +14,7 @@
  * for more details.
  *
 -->
-<?include $(var.ProjectPath)Platform.wxi?>
+<?include $(sys.CURRENTDIR)Platform.wxi?>
 
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
     <Fragment>