>>> Wt names its debug and release libraries different, by adding a 'd' to
>>> the development versions.
>>
>> What about making that optional? That way I would get rid of a patch I
>> use in the Debian packaging
>>
>
> You shouldn't install the debug libraries on debian, should you?
There is no need to, but you can. In fact, on Debian (and Ubuntu and
any other Debian-derivative using my packages), you can coinstall both
versions. The release version is installed in /usr/lib and the debug
version is installed in /usr/lib/debug/usr/lib :
[EMAIL PROTECTED]:~$ dpkg -L witty | grep \/usr\/lib
/usr/lib
/usr/lib/libwtext.so.2.2.1
/usr/lib/libwthttp.so.2.2.1
/usr/lib/libwtfcgi.so.2.2.1
/usr/lib/libwt.so.2.2.1
/usr/lib/libwthttp.so.4
/usr/lib/libwtfcgi.so.4
/usr/lib/libwt.so.9
/usr/lib/libwtext.so.6
[EMAIL PROTECTED]:~$ dpkg -L witty-dbg | grep \/usr\/lib
/usr/lib
/usr/lib/debug
/usr/lib/debug/usr
/usr/lib/debug/usr/lib
/usr/lib/debug/usr/lib/libwtext.so.2.2.1
/usr/lib/debug/usr/lib/libwthttp.so.2.2.1
/usr/lib/debug/usr/lib/libwtfcgi.so.2.2.1
/usr/lib/debug/usr/lib/libwt.so.2.2.1
By default, when you run your application, it uses the release version
of the libraries. In case you want to use the debug version, you only
need to run your application like this:
[EMAIL PROTECTED]:~$
LD_LIBRARY_PATH=/usr/lib/debug/usr/lib:$LD_LIBRARY_PATH ./mywebapp.wt
I. e. you do not need to rebuild your webapp. This is possible because
I build Wt in the using CMAKE_BUILD_TYPE=RelWithDebInfo and strip the
symbols and superfluous information using dh_strip.
>>> Also in windows, you have to add a few more
>>> dependent libraries.
>>> Try this:
>>> TARGET_LINK_LIBRARIES(myprog.wt DEBUG wtd wtthttpd winmm OPTIMIZED wt
>>> wthttp winmm)
>>
>> Two points here:
>> - "find_package(wt required)" and using the variables it provides
>> (Wt_LIBRARY, etc) should be thne preferred way when using CMake to
>> build a Wt application
>
> I haven't found a way to install the FindWt file on windows in a place
> where it is always found
There is no need to install it in a place where it is always found
(although probably %WINDIR%, %COMMONFILES% and others might work).
It's easier to organize your application (not Wt's) tree like this:
myapp <-- Souce, headers, resources, as much directories as you need
myapp/cmake <-- Copy FindWt.cmake here
Then use add this line to your webapp's CMakeLists.txt, right after
PROJECT( myapp ) :
SET( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake )
Now you can safely use FIND_PACKAGE( Wt REQUIRED ) and it will use
FindWt.cmake from your project's source directory.
In addition to that, as on Windows there is no well-known place for
libraries, it may be useful to set, in the webapp's CMakeLists.txt,
these two lines before FIND_PACKAGE:
SET( CMAKE_LIBRARY_PATH C:\\where\\wt\\libs\\are\\installed )
SET( CMAKE_LIBRARY_PATH C:\\where\\wt\\headers\\are\\installed )
As those details are not obvious, what about including a "template" webapp ?
>> - FindWt.cmake should add 'winmm' to Wt_LIBRARY or WtHTTP_LIBRARY,
>> whichever contains the dependency
>>
>
> Correct, but, if I'm not mistaken, that dependency is only required
> when linking to static versions of the library. Hmm, I should probably
> change the FindWt file to take into account how exactly the library
> was built.
>
> I guess I will have to make some updates to the cmake file on Windows.
An interesting addition would be to require CMake 2.6.1, as it adds
the HINTS parameter to FIND_LIBRARY and FIND_FILE (more information on
HINTS: http://mail.kde.org/pipermail/kde-buildsystem/2008-June/004762.html
)
--
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest