Just want to share this regarding CMakeLists.txt variables. When I want
to get rid of them, I manually code the CMakeLists as follows :) :
CMakeLists.txt:
ADD_EXECUTABLE(prog
main.cpp
)
TARGET_LINK_LIBRARIES(prog
wt
wtext
wthttp
boost_thread
boost_signals
boost_filesystem
boost_program_options
)
or sometimes as...
cmake_minimum_required(VERSION 2.6)
ADD_EXECUTABLE(prog
main.cpp
)
TARGET_LINK_LIBRARIES(prog
wt
wtext
wthttp
boost_thread-gcc43-mt
boost_signals-gcc43-mt
boost_filesystem-gcc43-mt
boost_program_options-gcc43-mt
)
I suggest to further play with the TARGET_LINK_LIBRARIES. This will
depend on your installation and sometime I comment out boost_thread when
it not supported in my wt make.
Shane Kerns wrote:
> Thanks Pau, I usually use SConstruct for there purposes, however for
> Wt I will use cmake. Actually all I wanted to know is how I would
> compile a simple isolated hello.C application into hello.wt without
> the EXAMPLES_CONNECTOR and other variables specific to the hello.C
> examples application. This is what my current CMakeLists.txt looks
> like
>
> ADD_EXECUTABLE(hello.wt hello.C)
> TARGET_LINK_LIBRARIES(hello.wt ${EXAMPLES_CONNECTOR})
>
> #
> # If you have Wt installed somehwere, you should use the
> # installed Wt header files for your own Wt projects.
> # e.g. INCLUDE_DIRECTORIES(/usr/local/include)
> # instead of the following:
> #
> #INCLUDE_DIRECTORIES(${WT_SOURCE_DIR}/src)
> INCLUDE_DIRECTORIES(/opt/boost/include/boost-1_39/ /opt/wt-2.2.4/src)
>
> #
> # Create a deploy script
> #
> SET(APPNAME hello)
> SET(APPBIN hello.wt)
> SET(APPRESOURCES "")
>
>
> On Fri, May 29, 2009 at 1:11 AM, Pau Garcia i Quiles
> <[email protected]> wrote:
>
>> On Thu, May 28, 2009 at 11:49 PM, Shane Kerns <[email protected]> wrote:
>>
>>> Sorry for this noob like question but where are the variables like
>>> WT_SOURCE_DIR
>>>
>> It's defined implicitly by CMake. When you do PROJECT( WT ), CMake
>> creates two variables:
>> - WT_SOURCE_DIR, which is the directory containing the CMakeLists.txt
>> file where you have the PROJECT( WT ) directive
>> - WT_BINARY_DIR, which is the directory which corresponds to the
>> WT_SOURCE_DIR in the build directory (CMake creates in the build
>> directory the same hierarchy you have in the source directory)
>>
>>
>>> , CMAKE_INSTALL_PREFIX
>>>
>> Internal to CMake
>>
>>
>>> , EXAMPLES_CONNECTOR,
>>>
>> In the main CMakeLists.txt:
>>
>> SET(EXAMPLES_CONNECTOR wthttp CACHE STRING "Connector used for examples")
>>
>>
>>> BOOST_INCLUDE_DIRS
>>>
>> It's not defined anywhere. It's used by the Asio and the Boost finders
>> to search in non-standard paths. If you have Boost installed in a
>> non-standard path, you would define BOOST_INCLUDE_DIRS when you invoke
>> CMake: cmake -DBOOST_INCLUDE_DIRS=/path/to/my/boost/installation
>>
>>
>>> . This is by no means an exhaustive list but I did a
>>> grep on the entire root wt directory and could not understand how the
>>> CMakeCache.txt is able to recognize those variables given that the
>>> CMakeCache.txt is actually a generated file.
>>>
>> You should read at least the first 20-30 slides in my CMake tutorial:
>> http://www.elpauer.org/stuff/learning_cmake.pdf
>>
>> --
>> Pau Garcia i Quiles
>> http://www.elpauer.org
>> (Due to my workload, I may need 10 days to answer)
>>
>> ------------------------------------------------------------------------------
>> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
>> is a gathering of tech-side developers & brand creativity professionals. Meet
>> the minds behind Google Creative Lab, Visual Complexity, Processing, &
>> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
>> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
>> _______________________________________________
>> witty-interest mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
>
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest