soci icon indicating copy to clipboard operation
soci copied to clipboard

CMake install target not generating cmake config

Open DraconPern opened this issue 9 years ago • 5 comments

there's no way to include soci in another cmake project because the sociconfig.cmake file is missing from the installed directory. Attempt to use FindSoci.cmake doesn't work either because the lib is decorated e.g. libsoci_core_3_2.lib

DraconPern avatar Sep 18 '15 18:09 DraconPern

Basically, it doesn't work if one uses find_package in config mode nor module mode.

DraconPern avatar Sep 18 '15 18:09 DraconPern

@DraconPern TBH, I have not managed to wrap my head around the CMake project.config magic. Last time I tried I gave up on unclear documentation and lack of complete sample for a project that is more complex than basic 'hello world'.

CMake-experienced contributors strongly welcome :)

mloskot avatar Sep 18 '15 22:09 mloskot

i'll work on some modifications to get it building on appveyor on windows. I noticed that it's got switches for both shared and static build. I think they should be mutually exclusive options? boost does it that way, and most of the projects I have worked on also do the same.

DraconPern avatar Sep 23 '15 06:09 DraconPern

@DraconPern I prefer it should be exclusive and controlled by standard variable BUILD_SHARED_LIBS as pointed out here http://www.slideshare.net/DanielPfeifer1/cmake-48475415 slide 28 @mloskot What do you think?

snikulov avatar Sep 23 '15 06:09 snikulov

@snikulov I agree. It was first time I read through Daniel Pfeifer's presentation. It's great resource, I wish I knew it before I created CMake setup for SOCI :)

mloskot avatar Sep 23 '15 08:09 mloskot