El 19/09/2017 a las 13:57, Elvis Stansvik escribió:
I also build on Win 8.1/MSVC 2015, targeting Windows 7+, and what I do is basically: if(WIN32) add_definitions(/D_WIN32_WINNT=0x0601) # Target Windows 7+ set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ".") set(CMAKE_INSTALL_UCRT_LIBRARIES ON) include(InstallRequiredSystemLibraries) endif() The /D_WIN32_WINNT=0x0601 is what ensures Windows 7 compatibility and CMAKE_INSTALL_UCRT_LIBRARIES is what ensures Universal CRT libraries like the one you mentioned gets installed alongside the application. You'll end up with a truckload of such small DLLs, but AFAIK this is what you need to do if you want to do app-local deployment of the Universal CRT. Hope that helps. Elvis
I followed your advice and got a bunch of api-ms-* files in the install directory when I packed it. However, for my program, there were still 3 DLLs missing: api-ms-win-core-libraryloader-l1-2-0.dll, api-ms-win-core-sysinfo-l1-2-1.dll, api-ms-win-core-processthreads-l1-1-2.dll. Not sure if this is a bug in cmake. Not sure how cmake gets those dependencies. -- Gonzalo Garramuño -- 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: http://public.kitware.com/mailman/listinfo/cmake