[CMake] Setting permissions with CPack/WiX installer

Cook, Steven (G&I) Steven.Cook at riotinto.com
Tue Apr 9 02:09:12 EDT 2019


Hi Nils,

> From a command line environment where your compiler is properly set up and
> ninja is in PATH configure the root of the project with the Ninja generator
> (currently hardcoded in the tests); use an out of source build directory and
> set the REFERENCE_CMAKE_BIN_DIR cache variable to the bin-Directory of the
> CMake installation you want to test.
> Run e.g. "ctest -R properties" from the build directory.

Thanks, that helped but I am now stuck on a different error where it can't
find the rc command. I have modified PATH to include the rc directory
(C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64) but it still
can't find it.

RC Pass 1: command "rc /foCMakeFiles\cmTC_0bc1e.dir/manifest.res CMakeFiles\cmTC_0bc1e.dir/manifest.rc" failed (exit code 0) with the following output:
The system cannot find the file specified

I have made a very simple example that generates a WIX installer for a single
file but fails to set the permissions on the file. Do you have any suggestions
of why this isn't working?


cmake_minimum_required(VERSION 2.8.12)

install(
    FILES test.txt
    DESTINATION ./
)

set_property(INSTALL
    test.txt
    PROPERTY CPACK_WIX_ACL "Everyone=GenericRead,GenericWrite"
)

set( CPACK_GENERATOR WIX )
include(CPack)


Thanks
Steve


More information about the CMake mailing list