[CMake] ExternalProject_Add Visual Studio build Install Target

J Decker d3ck0r at gmail.com
Sun Sep 1 00:56:05 EDT 2019


Why does it seem I'm the only one with this problem?
I've recently updated this other portable system while I'm on the road, and
the latest version of course fails the same way.

---- The Current build output

1>------ Build started: Project: intershell
(ExternalProjectTargets\intershell\intershell), Configuration:
RelWithDebInfo x64 ------
1>  Performing install step for 'intershell'
1>  Microsoft (R) Build Engine version 14.0.23107.0
1>  Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>MSBUILD : error MSB1009: Project file does not exist.
1>  Switch: install
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

-----
share\cmake-3.15\Modules\ExternalProject.cmake
line 1853

      if(step STREQUAL "INSTALL")
        list(APPEND args --target install)
      endif()


Change to
      if(step STREQUAL "INSTALL")
        list(APPEND args --target INSTALL)
      endif()

 -------------------

And then the output looks like
 --------------
1>------ Build started: Project: intershell
(ExternalProjectTargets\intershell\intershell), Configuration:
RelWithDebInfo x64 ------
1>  Performing install step for 'intershell'
1>  Microsoft (R) Build Engine version 14.0.23107.0
1>  Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>    InterShell.Service.vcxproj ->
M:\javascript\sack-gui\build\sack-src\src\intershell-build\service.shell\RelWithDebInfo\InterShell.Service.exe
..........
(completes successfully )



On Thu, Apr 25, 2019 at 1:27 AM J Decker <d3ck0r at gmail.com> wrote:

> I've had to make this modification the last few versions...
>
> cmake/share/cmake-3.14/Modules/ExternalProject.cmake
>
> line 1870 from
>
>       if(step STREQUAL "INSTALL")
>         list(APPEND args --target install)
>       endif()
>
> to
>
>       if(step STREQUAL "INSTALL")
>         list(APPEND args --target INSTALL)
>       endif()
>
> Otherwise, when building with visual studio, and trying to run the
> <project>-install.rule  rule, it says 'no such project'
>
> I don't think the same issue happens when building from the command line.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190831/738e2b6c/attachment.html>


More information about the CMake mailing list