# file : odb/buildfile # copyright : Copyright (c) 2009-2018 Code Synthesis Tools CC # license : GNU GPL v3; see accompanying LICENSE file plugin_dir = $config.odb.plugin_dir define plugin: libs plugin{*}: bin.lib.prefix = # No lib prefix. plugin{*}: backlink = true # Backlink in forwarded configs (next to exe). # On Windows we want the plugin (odb.dll) to go into bin/ (default), next to # the driver (odb.exe) since failed that we won't be able to find libraries we # depend on. # # @@ It feels like we should also -DODB_GCC_PLUGIN_DIR when updating for # install (but again not for Windows). # if ($cxx.target.system != 'mingw32') plugin{*}: install = $plugin_dir import libs = libcutl%lib{cutl} import libs += libstudxml%lib{studxml} ./: exe{odb} plugin{odb} exe{odb}: cxx{odb} exe{odb}: libus{odb}: bin.whole = false plugin{odb}: libus{odb} if ($cxx.target.system == 'mingw32') plugin{odb}: cxx.libs += $plugin_dir/cc1plus.exe.a libus{odb}: {hxx ixx txx cxx}{** -odb -options} {hxx ixx cxx}{options} $libs cxx.poptions += "-I$plugin_dir/include" cxx.poptions += -DODB_BUILD2 # @@ TMP while supporting other build systems. # Don't install any of the plugin's headers. # {hxx ixx txx}{*}: install = false # Generated options parser. # # @@ TMP: currently generated code is committed to allow building from git. # if $cli.configured { cli.cxx{options}: cli{options} cli.options += --include-with-brackets --include-prefix odb \ --guard-prefix ODB --generate-file-scanner --generate-specifier \ --generate-modifier --generate-description --suppress-undocumented \ --cxx-prologue '#include ' # Include the generated cli files into the distribution and don't remove # them when cleaning in src (so that clean results in a state identical to # distributed). # cli.cxx{*}: dist = true cli.cxx{*}: clean = ($src_root != $out_root) # We keep the generated code in the repository so copy it back to src in # case of a forwarded configuration. # cli.cxx{*}: backlink = overwrite }