On Fri, Sep 30, 2011 at 7:04 PM, Alec Taylor <alec.tayl...@gmail.com> wrote:
> Thanks for the speedy reply!
>
> I haven't used CMake before though (except with Wt); what are the contents
> of:
>
> • CMakeLists.txt
>
This is the CMake "project" file. It's the equivalent of the .sln and
.vcproj files.
• FindWt.cmake
>
>
The module to find Wt. Copy it from the Wt sources, it's in the 'cmake'
directory.
As CMake is cross-platform, it does not specify paths to libraries, include
directories, etc but discover them. To do so, you use the find_library,
find_file, etc commands.
For libraries that are used frequently, people write modules (also called
"finders") such as FindWt.cmake. It does all the find_library, find_file,
etc internally and provides you with some variables you can use. To use a
module in your CMakeLists.txt, you do find_package(Module).
For instance, for Wt you would do find_package(Wt REQUIRED). The REQUIRED
keyword tells CMake that module is an essential requirement, and it should
fail and refuse to continue if it's not available.
You may be interested in my CMake tutorial:
http://www.elpauer.org/stuff/learning_cmake.pdf
(a bit outdated, but still relevant)
Thanks for the info,
>
> Alec Taylor
>
> On 10/1/11, Pau Garcia i Quiles <pgqui...@elpauer.org> wrote:
> > Hi,
> >
> > It's no different from a standard CMake C++ project.
> >
> > The directory structure I use for simple cases is:
> >
> > CMakeLists.txt
> > hello.cpp
> > cmake/FindWt.cmake
> > cmake/FindSomethingElse.cmake
> >
> > Then from the source dir:
> >
> > $ mkdir build
> > $ cd build
> > $ cmake ..
> >
> > For more complex projects, instead of putting the source files directly
> into
> > the project directory, I have one or more directories for the sources:
> >
> > CMakeLists.txt
> > README
> > LICENSE
> > cmake/FindWt.cmake
> > cmake/FindSomethingElse.cmake
> > src/file1.cpp
> > src/file1.h
> > src/main.cpp
> > src/plugins/virtualization/virt.cpp
> > src/plugins/virtualization/virt.h
> > src/plugins/vnc/vnc.cpp
> > src/plugins/vnc/vnc.h
> >
> >
> >
> > On Fri, Sep 30, 2011 at 6:12 PM, Alec Taylor <alec.tayl...@gmail.com>
> wrote:
> >
> >> Good morning,
> >>
> >> I'm creating my own project in Wt (finally moving off the example
> >> project) but am having a little trouble working out how to get
> >> everything working with the dependencies & all.
> >>
> >> Just spent the last length of time configuring Visual Studio 2010,
> >> when I considered what people not running VS would use...
> >>
> >> Can you give me a tutorial on how to create a project with a single
> >> .cpp file (hello.wt), that can uses CMake to compile to a project dir?
> >>
> >> Thanks for all suggestions,
> >>
> >> Alec Taylor
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> All of the data generated in your IT infrastructure is seriously
> valuable.
> >> Why? It contains a definitive record of application performance,
> security
> >> threats, fraudulent activity, and more. Splunk takes this data and makes
> >> sense of it. IT sense. And common sense.
> >> http://p.sf.net/sfu/splunk-d2dcopy2
> >> _______________________________________________
> >> witty-interest mailing list
> >> witty-interest@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/witty-interest
> >>
> >
> >
> >
> > --
> > Pau Garcia i Quiles
> > http://www.elpauer.org
> > (Due to my workload, I may need 10 days to answer)
> >
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest