<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 31, 2019 at 9:56 PM J Decker <<a href="mailto:d3ck0r@gmail.com">d3ck0r@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Why does it seem I'm the only one with this problem?</div></div></div></div></blockquote><div><br></div><div>This is an external CMakeLists.txt that fails.</div><div>---- </div><div>cmake_minimum_required(VERSION 3.15)<br><br>set_property(GLOBAL PROPERTY USE_FOLDERS On)<br><br>project( B )<br>include( ExternalProject )<br><br>add_executable( b b.c )</div><div><br></div><div>###### Specifically this line causes the fails #############<br>SET_TARGET_PROPERTIES(b PROPERTIES FOLDER "install" )<br><br>install( TARGETS b )<br></div><div>-----</div><div><br></div><div> </div><div><br></div><div><br></div><div><br></div><div>A full Test  ...</div><div>--- CMakeLists.txt---</div><div>cmake_minimum_required(VERSION 3.15)<br><br>if( NOT EXISTS b ) <br> file(MAKE_DIRECTORY b)<br>        file( WRITE b/b.c "#include <stdio.h>\nint main(void) { printf( \"Program.\\n\" ); }" )<br>     file( WRITE b/CMakeLists.txt  "cmake_minimum_required(VERSION 3.15)\n\nset_property(GLOBAL PROPERTY USE_FOLDERS On)\n\nproject( B )\ninclude( ExternalProject )\n\nadd_executable( b b.c )\nSET_TARGET_PROPERTIES(b PROPERTIES\n                  FOLDER \"install\" )\n\ninstall( TARGETS b )\n" )<br><br>endif( NOT EXISTS b )<br><br>set_property(GLOBAL PROPERTY USE_FOLDERS On)<br><br>project( Test )<br><br>include( ExternalProject )<br><br>ExternalProject_Add( b<br>        PREFIX b-src<br>       SOURCE_DIR ${CMAKE_SOURCE_DIR}/b<br>      BINARY_DIR b_exe<br>      INSTALL_DIR ${CMAKE_INSTALL_PREFIX}<br>        BUILD_ALWAYS 1<br>       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> <br>           -DCMAKE_BUILD_TYPE:PATH=${CMAKE_BUILD_TYPE} <br>)<br></div><div><br></div><div>--- End CMakeLists.txt---</div><div><br></div><div>mkdir build</div><div>cd build</div><div>cmake .. -DCMAKE_INSTALL_PREFIX=output</div><div>cmake --build . --target install</div><div><br></div><div>Error Output:</div><div> MSBUILD : error MSB1009: Project file does not exist. [M:\tmp\cmake_vs_install\build\b.vcxproj]<br>  Switch: install<br><br></div><div><br></div><div>-----------</div><div><br></div><div>  SET_TARGET_PROPERTIES(b PROPERTIES FOLDER "Install" ) # capitalize I bypasses the issue<br></div><div>  SET_TARGET_PROPERTIES(b PROPERTIES FOLDER "Install and Deploy" ) # make it really log also bypasses the issue...<br></div><div><br></div><div>otherwise capitalizing --target INSTALL in the ExternalProject.cmake, for visual studio, also fixed the problem, since the real target is 'INSTALL' and not 'install'</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div>
</blockquote></div></div>