[odb-users] libodb with cmake

Alex Beimler alex-beimler at web.de
Tue Feb 17 21:33:52 EST 2015

Is there a Full Support of cmake for libodb, libodb-sqlite, libodb-...
I mean not the odb-Compiler (already solved this Problem) or the 

Actually i use the ExternProject Module of cmake to build libodb.

             SOURCE_DIR ${THRIDPARTY_DIR}/libodb
             CONFIGURE_COMMAND ./configure 
             BUILD_COMMAND make install
             INSTALL_COMMAND ""
             BUILD_IN_SOURCE 1)

         DEPENDS libodb sqlite3
         SOURCE_DIR ${THRIDPARTY_DIR}/libodb-sqlite
         CONFIGURE_COMMAND ./configure --with-libodb=${ODB_LIBRARY_DIR} 
         BUILD_COMMAND make install
         BUILD_IN_SOURCE 1)

or (in older Projects) use FindPackage-Module, compile libodb manually 
(./configure, make install into /usr/local) (Not really Cross-platform)

Its works but i have same Problems.
1. the obj-Files are make into the SourceCode-Dir not in the 
     The Libs just "install" into the ${CMAKE_CURRENT_BINARY_DIR}.
2. Not sure what Variables/Configures are set.
3. Whats about the (Cross)Compiler(Flags), System-include/lib path, 
BuildType, ...
4. Dependency Hell, libodb-.. needs libodb, (profile) needs boost, Qt, 
... needs DB-lib
5. Switch from shared-lib to static-lib (build only static-lib), 
libodb-sqlite.a vs libodb.so
6. Switch/Enable/Disable libodb-DB MySQL vs. PGSQL, SQLite only for 
Tests, Develop vs. Productive (separate sql-Statements)

Most of the configurations were so easy to maintain with cmake. 
(Variables, Settings, if-statements, cmake-gui, ...)

More information about the odb-users mailing list