Am 06.12.2012 um 21:58 schrieb Mateusz Loskot:

> On 6 December 2012 16:06, Philipp Kraus <[email protected]> wrote:
>> 
>> Why don't you use on the include and the library the path value? At the
>> moment it is different. IMHO should be on both flags the path value or it
>> should be the full path to the files.
> 
> This is how CMake handles these paths.
> It is not imposed by SOCI configuration.
> So, you may want to find out asking CMake folks.
> 
> In fact, despite I knew how it works, I wasn't sure about the rationale myself
> and I asked on CMake mailing list. Here [1] is the answer I received:

You use also eg on POSTGRESQL_INCLUDE_DIR a cmake String type and I push on 
this the path of the include dir.
Why can't you do this equal on the library flag? The library for postgres is 
named libpg.dylib / libpg.so / pg.dll.
You can setup this in the cmake build script equal to the include dir. I think 
it is more consistent to use only pathes or only files.

IMHO it is consistent if I put to the include flag the <path to 
postgres>/libpg-fe.h or a path to the library dir. At the moment I need put
a path to the include flag and a file to the library flag.
I think a path on both variables are the bast choice, so I setup 
postgres_include_dir:String=/path_to_pg/include and 
postgres_library_dir=/path_to_postgres/lib
In the cmake build script you can use the this flag to setup the linker command 
g++ -L${postgres_library_dir} -lpg
The g++ will search the -L pathes to link again the pg dynamic library (MSVC 
should be similar)

Phil
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to