<div dir="ltr">you can just install the runtime redistributuable for 2015... <div><br></div><div><a href="https://www.microsoft.com/en-us/download/details.aspx?id=48234">https://www.microsoft.com/en-us/download/details.aspx?id=48234</a><br></div><div> </div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 19, 2017 at 9:57 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">2017-09-19 17:50 GMT+02:00 Gonzalo Garramuño <<a href="mailto:ggarra13@gmail.com">ggarra13@gmail.com</a>>:<br>
> I compile on Windows 8.1.  I just found out that my program does not work on<br>
> Windows 7 after I upgraded my toolchain to VC2015. Users of my program on<br>
> Windows 7 get:<br>
><br>
> Missing DLL ms-api-win-core-libraryloader-<wbr>l1-2-0.dll<br>
><br>
> After some digging, I found out that it can be because the use of SDK Sets<br>
> on win8.1.  And that perhaps setting the compiler compatibility to WinXP<br>
> should fix it.  However, I don't know how to do that from cmake.<br>
<br>
</span>I also build on Win 8.1/MSVC 2015, targeting Windows 7+, and what I do<br>
is basically:<br>
<br>
if(WIN32)<br>
    add_definitions(/D_WIN32_<wbr>WINNT=0x0601) # Target Windows 7+<br>
<br>
    set(CMAKE_INSTALL_SYSTEM_<wbr>RUNTIME_DESTINATION ".")<br>
    set(CMAKE_INSTALL_UCRT_<wbr>LIBRARIES ON)<br>
    include(<wbr>InstallRequiredSystemLibraries<wbr>)<br>
endif()<br>
<br>
The /D_WIN32_WINNT=0x0601 is what ensures Windows 7 compatibility and<br>
CMAKE_INSTALL_UCRT_LIBRARIES is what ensures Universal CRT libraries<br>
like the one you mentioned gets installed alongside the application.<br>
<br>
You'll end up with a truckload of such small DLLs, but AFAIK this is<br>
what you need to do if you want to do app-local deployment of the<br>
Universal CRT.<br>
<br>
Hope that helps.<br>
<span class="HOEnZb"><font color="#888888"><br>
Elvis<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Any ideas?<br>
><br>
> If you want to see my CMakeLists.txt, you can get the code with:<br>
><br>
> $ git clone ssh://<a href="http://ggarra13@git.code.sf.net/p/mrviewer/code" rel="noreferrer" target="_blank">ggarra13@git.code.sf.<wbr>net/p/mrviewer/code</a> mrviewer-code<br>
><br>
><br>
> --<br>
> Gonzalo Garramuño<br>
><br>
> --<br>
><br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more<br>
> information on each offering, please visit:<br>
><br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a><br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake</a></div></div></blockquote></div><br></div>