<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Thanks for the tip, but that hasn't been very helpful to me. Perhaps I'm not doing it right. Here is a bit of CMake code so the conversation can be more concrete. Perhaps someone on list can try it out...<div>
<br></div><div>You'll need these two files...</div>
<div><br></div><div><a href="http://www.fltk.org/software.php?VERSION=1.3.2&FILE=fltk/1.3.2/fltk-1.3.2-source.tar.gz" target="_blank">http://www.fltk.org/software.php?VERSION=1.3.2&FILE=fltk/1.3.2/fltk-1.3.2-source.tar.gz</a><br>
</div><div><a href="http://seriss.com/people/erco/fltk/tmp/vsnet-makefiles.0.85.zip" target="_blank">http://seriss.com/people/erco/fltk/tmp/vsnet-makefiles.0.85.zip</a><br></div><div><br></div><div>Place them in the same directory with the following in the CMakeLists.txt</div>
<div><br></div><div>CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )<br></div><div><br></div><div>INCLUDE( ExternalProject )</div><div><br></div><div>SET( VS_MAKEFILE_ZIP vsnet-makefiles.0.85.zip )<br></div><div>
<div><br></div><div>ExternalProject_Add( FLTK</div><div><span style="white-space:pre-wrap">        </span>URL ${CMAKE_SOURCE_DIR}/fltk-1.3.2-source.tar</div><div><span style="white-space:pre-wrap">        </span>UPDATE_COMMAND</div>
<div><span style="white-space:pre-wrap">                </span>${CMAKE_COMMAND} -E copy_if_different</div><div><span style="white-space:pre-wrap">                </span>${CMAKE_SOURCE_DIR}/${VS_MAKEFILE_ZIP}</div><div><span style="white-space:pre-wrap">                </span><SOURCE_DIR>/${VS_MAKEFILE_ZIP}</div>
<div><span style="white-space:pre-wrap">        </span>COMMAND</div><div><span style="white-space:pre-wrap">                </span>${CMAKE_COMMAND} -E tar -xzf <SOURCE_DIR>/${VS_MAKEFILE_ZIP}</div><div><span style="white-space:pre-wrap">        </span><br>
</div><div><span style="white-space:pre-wrap">        </span>PATCH_COMMAND ""</div><div><span style="white-space:pre-wrap">        </span>CONFIGURE_COMMAND ""</div><div><span style="white-space:pre-wrap">        </span>BUILD_COMMAND ""</div>
<div><span style="white-space:pre-wrap">        </span>INSTALL_COMMAND ""</div><div>)<br></div></div><div><br></div><div><br></div><div>To build this manually, first, unzip both files into the same directory. Then, launch the Visual Studio Command Prompt, usually accessed via the VS/<span style="color:rgb(80,0,80)">vcvarsall.bat program included with Visual Studio.</span></div>
<div><span style="color:rgb(80,0,80)"><br></span></div><div>Once both files are unzipped into the same directory, and you are in the VS prompt environment, you can build FLTK using the batch program 'gmake.bat'.</div>
<div><br></div><div>For better or worse, it prompts the user to input for Debug or Release, and then for Verbose or Quiet. If you make a simple text file with the entries one per line...</div><div><br></div><div>******* input.txt</div>
<div>R</div><div>Q</div><div>*******</div><div><br></div><div>You can feed that to the batch program thusly....</div><div><br></div><div>gmake < input.txt</div><div><br></div><div>Alternately, if you can set DEBUG=R and VERBOSE=Q environment variables to the shell used to run 'gmake.bat', then you don't have to feed the text file for the user-input prompts.</div>
<div><br></div><div>I tried something like the following....</div><div><br></div><div>BUILD_COMMAND<br></div><div><div> ${CMAKE_COMMAND} --build <SOURCE_DIR> -- gmake<br></div></div><div><br></div><div>But, it didn't seem to do anything useful....</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>Rob</div></font></span><div><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 8, 2014 at 5:31 PM, J Decker <span dir="ltr"><<a href="mailto:d3ck0r@gmail.com" target="_blank">d3ck0r@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">cmake --build<br>
<div><div><br>
On Wed, Jan 8, 2014 at 3:53 PM, Rob McDonald <<a href="mailto:rob.a.mcdonald@gmail.com" target="_blank">rob.a.mcdonald@gmail.com</a>> wrote:<br>
> Short version:<br>
><br>
> Does anyone have an elegant way to launch the visual studio command line<br>
> from within CMake?<br>
><br>
> James Bigler asked essentially this question back in March of 2011. David<br>
> responded with a link to a Blog entry, but I haven't figured out how to<br>
> translate that into something that works.<br>
><br>
> The 'vcvarsall.bat' program that comes with Visual Studio will launch the<br>
> command line with the full environment set.<br>
><br>
> Once I find vcvarsall, I then need to launch something in it -- and pass<br>
> parameters to that thing. All from within ExternalProject_Add. For now,<br>
> one step at a time...<br>
><br>
> Long version:<br>
><br>
> I'm trying to encapsulate the build of FLTK as an ExternalProject in CMake.<br>
> One way or the other, it needs to work for Visual Studio on Windows, and gcc<br>
> and llvm on Linux/MacOS.<br>
><br>
> Although FLTK has a CMake build system, it is currently unmaintained (broken<br>
> on at least some platforms), and none of the core FLTK developers use it, so<br>
> I don't see this situation improving.<br>
><br>
> I've got a ./configure based system working for Linux/MacOS.<br>
><br>
> One of the FLTK developers maintains an unofficial Makefile setup for<br>
> FLKT/Visual Studio that must be run from the Visual Studio command prompt.<br>
> Hence my question...<br>
><br>
> <a href="http://seriss.com/people/erco/fltk/tmp/vsnet-makefiles.0.85.zip" target="_blank">http://seriss.com/people/erco/fltk/tmp/vsnet-makefiles.0.85.zip</a><br>
><br>
> Thanks for any help,<br>
><br>
> Rob<br>
><br>
><br>
><br>
><br>
</div></div>> --<br>
><br>
> Powered by <a href="http://www.kitware.com" 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" target="_blank">http://www.cmake.org/Wiki/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" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div></div></div></div>
</div><br></div>