Ver código fonte

Windows MSI: Let CMake install Shell Extensions WiX fragment to "msi/"

Signed-off-by: Michael Schuster <michael@schuster.ms>
Michael Schuster 5 anos atrás
pai
commit
fc365df5de

+ 8 - 1
shell_integration/windows/CMakeLists.txt

@@ -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()

+ 1 - 1
shell_integration/windows/WinShellExt.wxs.in

@@ -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>