我正在尝试使用cmake为wix项目构建解决方案。但默认情况下它会生成.vcxproj。 CMakeLists.txt文件中的配置是什么,以将项目类型更改为.wixproj。
提前致谢。
我正在使用的配置是:
#
### Minimum required version of the cmake
#
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
#
### Set the Solution name and the language to support by the project
#
PROJECT(Transcend)
#
### Manage CMake Policy settings
#
CMAKE_POLICY(SET CMP0015 NEW)
#
### Additional library directories
#
IF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
LINK_DIRECTORIES(
${CMAKE_SOURCE_DIR}/trunk/ext/lib)
ELSE()
LINK_DIRECTORIES(
${CMAKE_SOURCE_DIR}/trunk/ext/lib)
ENDIF()
#set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991")
INCLUDE(InstallRequiredSystemLibraries)
set(CPACK_GENERATOR WIX)
set(CPACK_PACKAGE_NAME "Transcend")
set(CPACK_PACKAGE_VENDOR "CMake.org")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MyLib - CPack Component Installation Example")
set(CPACK_PACKAGE_VERSION "1.0.0")
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_WIX_INCLUDE "Directory_and_Reference.wxs")
SET(CPACK_WIX_INCLUDE "Feature.wxs")
SET(CPACK_WIX_INCLUDE "Machine__to_Install.wxs")
SET(CPACK_WIX_INCLUDE "Product.wxs")
SET(CPACK_WIX_INCLUDE "Shortcut_menu.wxs")
SET(CPACK_WIX_INCLUDE "User_Interface.wxs")
SET(CPACK_WIX_INCLUDE "UserRegistrationDlg.wxs")
INCLUDE(CPack)
答案 0 :(得分:3)
你没有。 WiX关注包装,这是CPack的领域。从CMake / CPack版本2.8.11开始,提供了WiX支持:http://www.cmake.org/cmake/help/v2.8.11/cmake.html#module:CPackWIX。有关使用CPack的一般说明,请参阅http://www.cmake.org/Wiki/CMake:Packaging_With_CPack。