[cmake-developers] [PATCH] CPackIFW: Added QtIFW 2.0 Support
Hi, Brad! More than a month ago was be announced QtIFW 2.0: http://blog.qt.io/blog/2015/04/07/qt-installer-framework-2-0-released Unfortunately, version 2.0 is incompatible with version 1.x from the point of view of the command line interface. Current version CPackIFW can't handle QtIFW 2.0 - it's time to fix it! I have tried to be as careful and to keep compatibility with QtIFW 1.x. I also a series of manual tests, and provided for everyone to evaluate CMake online installer: http://public.kitware.com/pipermail/cmake-developers/2015-May/025245.html Here's a list of my changes: -- CPackIFW: Added QtIFW 2.0 support Added variables (see sphinx doc): - CPACK_IFW_VERBOSE - CPACK_IFW_FRAMEWORK_VERSION - CPACK_IFW_PACKAGE_START_MENU_DIRECTORY - CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME - CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE - CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS - CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH - CPACK_IFW_PACKAGE_CONTROL_SCRIPT Updated himself IFW installer for QtIFW 2.0: - Uninstaller renamed to CMake Maintenance Tool -- Brad, please accept my changes :-) From my public repository (branch cpakc-ifw-updates): http://git.podsvirov.pro/?p=kitware/cmake.git;a=shortlog;h=refs/heads/cpack-ifw-updates Or... I tried to create .patch file based on the dir diff (I never did): File added as an attachment. (I'm learning git rebase - I think that all should come without problems) Regards, Konstantin Podsvirovdiff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index 5600b35..6003565 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -38,6 +38,10 @@ if(CPACK_GENERATOR MATCHES IFW) @_CPACK_IFW_PACKAGE_ICON@ set(CPACK_IFW_PACKAGE_WINDOW_ICON @CMake_SOURCE_DIR@/Source/QtDialog/CMakeSetup128.png) + set(CPACK_IFW_PACKAGE_CONTROL_SCRIPT +@CMake_SOURCE_DIR@/Source/QtIFW/controlscript.qs) + # Uninstaller configuration + set(CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME cmake-maintenance) # Package configuration group set(CPACK_IFW_PACKAGE_GROUP CMake) # Group configuration diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index e5b7601..6649933 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -2,7 +2,7 @@ # CPackIFW # # -# .. _QtIFW: http://qt-project.org/doc/qtinstallerframework/index.html +# .. _QtIFW: http://doc.qt.io/qtinstallerframework/index.html # # This module looks for the location of the command line utilities supplied with # the Qt Installer Framework (QtIFW_). @@ -33,18 +33,26 @@ # # You can use the following variables to change behavior of CPack ``IFW`` generator. # +# Debug +# +# +# .. variable:: CPACK_IFW_VERBOSE +# +# Set to ``ON`` to enable addition debug output. +# By default is ``OFF``. +# # Package # # # .. variable:: CPACK_IFW_PACKAGE_TITLE # # Name of the installer as displayed on the title bar. -# By default used :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` +# By default used :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY`. # # .. variable:: CPACK_IFW_PACKAGE_PUBLISHER # # Publisher of the software (as shown in the Windows Control Panel). -# By default used :variable:`CPACK_PACKAGE_VENDOR` +# By default used :variable:`CPACK_PACKAGE_VENDOR`. # # .. variable:: CPACK_IFW_PRODUCT_URL # @@ -63,6 +71,12 @@ # # Filename for a logo is used as QWizard::LogoPixmap. # +# .. variable:: CPACK_IFW_PACKAGE_START_MENU_DIRECTORY +# +# Name of the default program group for the product in the Windows Start menu. +# +# By default used :variable:`CPACK_IFW_PACKAGE_NAME`. +# # .. variable:: CPACK_IFW_TARGET_DIRECTORY # # Default target directory for installation. @@ -85,6 +99,35 @@ # The root package name, which will be used if configuration group is not # specified # +# .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME +# +# Filename of the generated maintenance tool. +# The platform-specific executable file extension is appended. +# +# By default used QtIFW_ defaults (``maintenancetool``). +# +# .. variable:: CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE +# +# Filename for the configuration of the generated maintenance tool. +# +# By default used QtIFW_ defaults (``maintenancetool.ini``). +# +# .. variable:: CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS +# +# Set to ``ON`` if the installation path can contain non-ASCII characters. +# +# Is ``ON`` for QtIFW_ less 2.0 tools. +# +# .. variable:: CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH +# +# Set to ``OFF`` if the installation path cannot contain space characters. +# +# Is ``ON`` for QtIFW_ less 2.0 tools. +# +# .. variable:: CPACK_IFW_PACKAGE_CONTROL_SCRIPT +# +# Filename for a custom installer control script. +# # .. variable:: CPACK_IFW_REPOSITORIES_ALL # # The list of remote repositories. @@ -113,6 +156,10 @@ # Tools # # +# .. variable:: CPACK_IFW_FRAMEWORK_VERSION +# +# The version of used
[cmake-developers] CMAKE_CURRENT_SOURCE_DIR points to build dir at build time
Hi, I'm facing a strange issue with CMake 3.2.2 when building with Visual Studio. This code snippet shows the problem: -- set(CS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/MyLib.cs ${CMAKE_CURRENT_SOURCE_DIR}/AssemblyInfo.cs) add_custom_command(OUTPUT mylib.dll COMMAND mcs /target:library /out:mylib.dll /debug /keyfile:${CMAKE_CURRENT_SOURCE_DIR}/key.snk ${CS_SOURCES}) -- This will generate and build fine under Linux, using both Makefile or Ninja generators. Under Windows, it will generate fine but Visual Studio will fail to build, stating that the C:\build\Mylib.cs and C:\build\AssemblyInfo.cs files cannot be found (source dir is C:\src). This indicates that it is in fact trying to find those files in the build directory, instead of the source directory. This seems to happen only at the building step; at the generation step, ${CMAKE_CURRENT_SOURCE_DIR} correctly points to C:\src. For a real-world example, this issue happens when compiling the libiio library with the C# bindings: http://github.com/analogdevicesinc/libiio.git My current workaround is to copy the source files to the build directory: https://gist.github.com/pcercuei/380550a3205c91f15b82 -- -- Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368; Geschaeftsfuehrer:Dr.Carsten Suckrow, William A. Martin, Margaret Seif -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] CMAKE_CURRENT_SOURCE_DIR points to build dir at build time
On 05/15/2015 05:09 AM, Paul Cercueil wrote: set(CS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/MyLib.cs ${CMAKE_CURRENT_SOURCE_DIR}/AssemblyInfo.cs) add_custom_command(OUTPUT mylib.dll COMMAND mcs /target:library /out:mylib.dll /debug /keyfile:${CMAKE_CURRENT_SOURCE_DIR}/key.snk ${CS_SOURCES}) Under Windows, it will generate fine but Visual Studio will fail to build, stating that the C:\build\Mylib.cs and C:\build\AssemblyInfo.cs files cannot be found (source dir is C:\src). This indicates that it is in fact trying to find those files in the build directory, instead of the source directory. CMake does not run during the build and there is no notion of evaluating CMake variables during the build. The references in your example code will be expanded during configuration and the value should be generated into the .vcxproj file without any such variable reference. Take a look at the generated .vcxproj file. How does the custom command appear there? -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] CMAKE_CURRENT_SOURCE_DIR points to build dir at build time
Hi Brad, On 15/05/2015 17:09, Brad King wrote: On 05/15/2015 05:09 AM, Paul Cercueil wrote: set(CS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/MyLib.cs ${CMAKE_CURRENT_SOURCE_DIR}/AssemblyInfo.cs) add_custom_command(OUTPUT mylib.dll COMMAND mcs /target:library /out:mylib.dll /debug /keyfile:${CMAKE_CURRENT_SOURCE_DIR}/key.snk ${CS_SOURCES}) Under Windows, it will generate fine but Visual Studio will fail to build, stating that the C:\build\Mylib.cs and C:\build\AssemblyInfo.cs files cannot be found (source dir is C:\src). This indicates that it is in fact trying to find those files in the build directory, instead of the source directory. CMake does not run during the build and there is no notion of evaluating CMake variables during the build. The references in your example code will be expanded during configuration and the value should be generated into the .vcxproj file without any such variable reference. Take a look at the generated .vcxproj file. How does the custom command appear there? -Brad I understand that CMake doesn't run at build time, that was a bad choice of words. In the generated .vcxproj I have something like that: C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /target:library /out:C:/build/mylib.dll /debug /keyfile:C:/src/key.snk C:/src/MyLib.cs C:/build/AssemblyInfo.cs The paths look fine, yet Visual Studio complains that it can't find C:/build/MyLib.cs. But now I understand the reason, it's because of the path separator. If I use a backslash '\' then csc.exe suceeds. I guess the reason why it was looking for the source in C:\build is because that's the current directory. Thanks! -Paul -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [PATCH] CPackIFW: Added QtIFW 2.0 Support
On 05/15/2015 03:09 AM, Konstantin Podsvirov wrote: Current version CPackIFW can't handle QtIFW 2.0 - it's time to fix it! Thanks. I applied the patches in these two commits: CPackIFW: Add QtIFW 2.0 support http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a0ba4d2 Update packaging of CMake for QtIFW 2.0 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=342d15cb -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] [CMake 0011944]: CPackDeb: Support dependencies between components/Debian packages
Please find attached some rework on the documentation. There is no hurry :) Applied with minor changes: http://www.cmake.org/gitweb?p=cmake.git;a=commit;h=efab805 Thanks, Domen -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers