# Still needing those administrative privileges

**URL:** https://discourse.cmake.org/t/still-needing-those-administrative-privileges/15374
**Category:** Usage
**Tags:** os:windows
**Created:** [December 8, 2025, 7:52am UTC](https://discourse.cmake.org/t/still-needing-those-administrative-privileges/15374 "2025-12-08T07:52:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![grafl](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@grafl](https://discourse.cmake.org/u/grafl)
#### Post date: [December 8, 2025, 7:52am UTC](https://discourse.cmake.org/t/still-needing-those-administrative-privileges/15374/1 "2025-12-08T07:52:56Z")

</div>

Hi,

my issue is quite simple, it generates the buildsystem for a custom library and an executable.

```auto
cmake_minimum_required(VERSION 4.0)
project(my_library LANGUAGES C VERSION 0.0.1)
include(cmake/ResolveDependencies.cmake)
# cache variables for installation destinations
include(GNUInstallDirs)
# include the package config helpers and generate the file below
include(CMakePackageConfigHelpers)
add_subdirectory(libraries)
add_subdirectory(application)

```

It builds and installs without problems, using this batch and the specified **–prefix** :

```auto
@echo off
if not “%\~1”==“” (
  set BUILD_TYPE=%\~1
) else (
  set BUILD_TYPE=Debug
)

set DS=-DCMAKE_BUILD_TYPE=%BUILD_TYPE%
set DS=%DS% -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON

cmake -S . -B \_build/%BUILD_TYPE% %DS%
cmake --build \_build/%BUILD_TYPE% --parallel 4 --config %BUILD_TYPE%
cmake --install \_build/%BUILD_TYPE% --config %BUILD_TYPE% --prefix \_install/%BUILD_TYPE%

```

I decided to use an external library (json-c), so I added it as a git submodule and I configured the CMake to use it:

```auto
add_subdirectory(submodules/json-c_cmake/json-c)

```

And now, the above batch fails, telling this:

```auto
CMake Error at _build/Debug/submodules/json-c_cmake/json-c/cmake_install.cmake:125 (file):
  file cannot create directory: C:/Program Files (x86)/my_library/include/json-c.
  Maybe need administrative privileges.
Call Stack (most recent call first):
  _build/Debug/cmake_install.cmake:37 (include)

```

The final CMakeLists.txt looks like this:

```auto
cmake_minimum_required(VERSION 4.0)
project(my_library LANGUAGES C VERSION 0.0.1)
include(cmake/ResolveDependencies.cmake)
# cache variables for installation destinations
include(GNUInstallDirs)
# include the package config helpers and generate the file below
include(CMakePackageConfigHelpers)
add_subdirectory(submodules/json-c_cmake/json-c)
add_subdirectory(libraries)
add_subdirectory(application)

```

Is it a way, to tell this submodule, that use please the already defined **–prefix**?  
Or, is something what I did wrong?

Best regards,  
László

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 9, 2026, 5:06am UTC](https://discourse.cmake.org/t/still-needing-those-administrative-privileges/15374/2 "2026-02-09T05:06:51Z")

</div>

`json-c` uses `CMAKE_INSTALL_FULL_INCLUDEDIR`, so it does not support specifying a prefix other than that specified at configure time. I suggest filing an issue with `json-c` developers; I see no need to use the `FULL_` variants.
