[CMake] Packaging issues
Volker Enderlein
volker.enderlein at ifm-chemnitz.de
Mon Apr 3 06:30:21 EDT 2017
Hi,
I'm facing problems using the packaging with CPACK.
I try to build three different packages, a MSI (via WIX), an IFW, and a
ZIP package.
According to the documentation I set the following variables in my
CMakeLists.txt (and a few more which are required):
set(CPACK_WIX_ROOT "C:/Temp/WiX-3.10/binaries")
set(QTIFWDIR "${GLOBAL}/Qt/Tools/QtInstallerFramework/2.0/bin")
set(CPACK_GENERATOR "WIX;IFW;ZIP")
After creating the build dir and running from there
cmake -G "Visual Studio 14 2015 Win64" ..\TestProject
the files CMakeCache.txt, CPackConfig.cmake, CPackSourceConfig.cmake,
and CPackProperties.cmake are generated.
When running `cpack -C Release` to build all three installers at once,
the first one (WIX) is built, but the second one (QtIFW) fails with the
messages
CPack Error: Cannot find QtIFW compiler "binarycreator": likely it is
not installed, or not in your PATH
CPack Error: Cannot initialize the generator IFW
I inspected the CMakeCache.txt file but found the following entries
properly defined:
//QtIFW binarycreator command line client
CPACK_IFW_BINARYCREATOR_EXECUTABLE:FILEPATH=N:/Global/Qt/Tools/QtInstallerFramework/2.0/bin/binarycreator.exe
//QtIFW devtool command line client
CPACK_IFW_DEVTOOL_EXECUTABLE:FILEPATH=N:/Global/Qt/Tools/QtInstallerFramework/2.0/bin/devtool.exe
//QtIFW installer executable base
CPACK_IFW_INSTALLERBASE_EXECUTABLE:FILEPATH=N:/Global/Qt/Tools/QtInstallerFramework/2.0/bin/installerbase.exe
//QtIFW repogen command line client
CPACK_IFW_REPOGEN_EXECUTABLE:FILEPATH=N:/Global/Qt/Tools/QtInstallerFramework/2.0/bin/repogen.exe
//Enable to build 7-Zip source packages
CPACK_SOURCE_7Z:BOOL=ON
//Enable to build ZIP source packages
CPACK_SOURCE_ZIP:BOOL=ON
//Path to a program.
CPACK_WIX_CANDLE_EXECUTABLE:FILEPATH=C:/Temp/WiX-3.10/binaries/candle.exe
//Path to a program.
CPACK_WIX_LIGHT_EXECUTABLE:FILEPATH=C:/Temp/WiX-3.10/binaries/light.exe
But when I checked the CPack*Config.cmake files none of the entries
above are referenced. After running the `cmake -G "Visual Studio 14 2015
Win64" ..\TestProject` a second time everything is fine; the entries are
referenced in CPack*Config.cmake files and all three installers can be
built.
So I really get stuck at this point.
Any ideas what could be the issue and how to avoid it?
Cheers Volker
More information about the CMake
mailing list