[odb-users] Using CMake for ODB (libraries forlder structre)
Михаил Комаров
s02130359 at stud.cs.msu.ru
Mon Apr 10 12:30:46 EDT 2017
Hello!
In fact, I have implemented CMake build system for some of ODB libraries and would like to propose to use some of it:
https://github.com/Nemo1369/libodb-boost/tree/cmake <https://github.com/Nemo1369/libodb-boost/tree/cmake>
https://github.com/Nemo1369/libodb-sqlite/tree/cmake <https://github.com/Nemo1369/libodb-sqlite/tree/cmake>
https://github.com/Nemo1369/libodb/tree/cmake <https://github.com/Nemo1369/libodb/tree/cmake>
It is kinda outdated, but can be merged with current ODB state.
Boris, what do you think of creating a branch with CMake-based build system in every Codesynthesis ODB-related repository?
Sincerely yours,
Mikhail Komarov
s02130359 at stud.cs.msu.ru
> On 10 Apr 2017, at 19:23, Timo Rothenpieler <timo at rothenpieler.org> wrote:
>
> See the provided example in that very repository.
> You need to add the directory that contains the two .cmake files to your CMAKE_MODULE_PATH.
>
> In case of the example:
> list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
>
> There is no requirement for that path, it can be whatever you like.
> For finding the library, it needs to be in
>
> The module uses pkg-config to find odb itself. So if your pkg config path is properly set up, there is nothing special you need to do.
>
>
> Am 10.04.2017 um 18:10 schrieb Panayiotis Georgiou:
>> Hello,
>> I am trying to generate an MSVC project using ODB, with the help of the
>> cmake scripts provided by Timo Rothenpieler at:
>> https://github.com/BtbN/OdbCmake
>> The issue I am having is that I cannot understand from the cmake scripts
>> provide what is the expected folder structure, and as a result, cmake is
>> unable to locate the necessary paths.
>> The folder structure that I am currently using is as follows:
>> ../ExternalLibraries/ODB/cmake/Modules (includes FindODB.cmake,
>> UseODB.cmake)
>> ../ExternalLibraries/ODB/libodb-2.4.0 (subfolders: bin, bin64, config,
>> lib, lib64, m4, odb )
>> ../ExternalLibraries/ODB/libodb-boost-2.4.0 (subfolders: bin, bin64,
>> config, lib, lib64, m4, odb )
>> ../ExternalLibraries/ODB/libodb-pgsql-2.4.0 (subfolders: bin, bin64,
>> config, lib, lib64, m4, odb )
>> ../ExternalLibraries/ODB/libodb-qt-2.4.0 (subfolders: bin, bin64, config,
>> lib, lib64, m4, odb )
>> ../ExternalLibraries/ODB/libodb-sqlite-2.4.0 (subfolders: bin, bin64,
>> config, etc, lib, lib64, m4, odb )
>> ../ExternalLibraries/ODB/odb-2.4.0-i686-windows (subfolders: bin, doc, etc,
>> man, mingw)
>> Using the above folder structure cmake is unable to configure ODB. I have
>> tried adding the path "../ExternalLibraries/ODB/libodb-2.4.0" in the
>> variables CMAKE_PREFIX_PATH and ODB_LIBRARY_PATH but did not help.
>> Can someone please help me in setting up the appropriate folder structure
>> so that ODB is detected, or let me know if I am doing something else wrong?
>> Thanks a lot.
>> PG
>
More information about the odb-users
mailing list