On Sat, Aug 31, 2019 at 9:56 PM J Decker <d3c...@gmail.com> wrote: > Why does it seem I'm the only one with this problem? >
This is an external CMakeLists.txt that fails. ---- cmake_minimum_required(VERSION 3.15) set_property(GLOBAL PROPERTY USE_FOLDERS On) project( B ) include( ExternalProject ) add_executable( b b.c ) ###### Specifically this line causes the fails ############# SET_TARGET_PROPERTIES(b PROPERTIES FOLDER "install" ) install( TARGETS b ) ----- A full Test ... --- CMakeLists.txt--- cmake_minimum_required(VERSION 3.15) if( NOT EXISTS b ) file(MAKE_DIRECTORY b) file( WRITE b/b.c "#include <stdio.h>\nint main(void) { printf( \"Program.\\n\" ); }" ) 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" ) endif( NOT EXISTS b ) set_property(GLOBAL PROPERTY USE_FOLDERS On) project( Test ) include( ExternalProject ) ExternalProject_Add( b PREFIX b-src SOURCE_DIR ${CMAKE_SOURCE_DIR}/b BINARY_DIR b_exe INSTALL_DIR ${CMAKE_INSTALL_PREFIX} BUILD_ALWAYS 1 CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_BUILD_TYPE:PATH=${CMAKE_BUILD_TYPE} ) --- End CMakeLists.txt--- mkdir build cd build cmake .. -DCMAKE_INSTALL_PREFIX=output cmake --build . --target install Error Output: MSBUILD : error MSB1009: Project file does not exist. [M:\tmp\cmake_vs_install\build\b.vcxproj] Switch: install ----------- SET_TARGET_PROPERTIES(b PROPERTIES FOLDER "Install" ) # capitalize I bypasses the issue SET_TARGET_PROPERTIES(b PROPERTIES FOLDER "Install and Deploy" ) # make it really log also bypasses the issue... otherwise capitalizing --target INSTALL in the ExternalProject.cmake, for visual studio, also fixed the problem, since the real target is 'INSTALL' and not 'install'
-- 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: https://cmake.org/mailman/listinfo/cmake