On Fri, May 29, 2009 at 5:21 PM, Shane Kerns <[email protected]> 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})
You should use FIND_PACKAGE( Wt REQUIRED ) and replace
${EXAMPLES_CONNECTOR} with ${Wt_LIBRARIES}. See cmake/FindWt.cmake in
the Wt sources.
I want to update FindWt.cmake to support the new COMPONENTS and
VERSION syntax, i. e:
FIND_PACKAGE( Wt 2.99.1 EXACT COMPONENTS wthttp wtchart REQUIRED )
(that would search only for wthttp and wtchart, only version 2.99.1,
not newer, not older)
But I am not sure when I will find the time to do that :-(
> #
> # 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)
You should use FindBoost.cmake from CMake and do:
SET(Boost_ADDITIONAL_VERSIONS "1.39" "1.39.0" )
FIND_PACKAGE( Boost 1.39 EXACT COMPONENTS date_time filesystem )
# (I'm writing that from my memory, some more Boost components may be needed )
TARGET_LINK_LIBRARIES( hello.wt ${Boost_LIBRARIES} )
Read FindBoost.cmake in the CMake directory
(/usr/share/cmake-2.6/Modules/FindBoost.cmake in most Unix systems).
>
> #
> # 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
>
--
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