mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
orm: cross compile pg to linux; openssl: make cross compile work
This commit is contained in:
parent
986ed33deb
commit
27ff2f1628
5 changed files with 27 additions and 6 deletions
|
@ -12,6 +12,7 @@ $if $pkgconfig('libpq') {
|
|||
#flag -lpq
|
||||
}
|
||||
#flag linux -I/usr/include/postgresql
|
||||
//#flag linux -Ipostgresql // cross compiling to linux
|
||||
|
||||
#flag darwin -I/opt/local/include/postgresql11
|
||||
#flag darwin -L/opt/local/lib/postgresql11
|
||||
|
@ -32,12 +33,19 @@ $if $pkgconfig('libpq') {
|
|||
#flag freebsd -L/usr/local/lib
|
||||
}
|
||||
|
||||
// PostgreSQL Source Code
|
||||
// https://doxygen.postgresql.org/libpq-fe_8h.html
|
||||
#include <libpq-fe.h>
|
||||
$if cross_compile ? && linux {
|
||||
#include <libpq/libpq-fe.h>
|
||||
#include <libpq/pg_config.h>
|
||||
|
||||
// for PG_VERSION_NUM, which is defined everywhere at least since PG 9.5
|
||||
#include <pg_config.h>
|
||||
//#flag -lpq // libpq.a is located in LINUXROOT/lib/x86_64-linux-gnu/libpq.a
|
||||
} $else {
|
||||
// PostgreSQL Source Code
|
||||
// https://doxygen.postgresql.org/libpq-fe_8h.html
|
||||
#include <libpq-fe.h>
|
||||
|
||||
// for PG_VERSION_NUM, which is defined everywhere at least since PG 9.5
|
||||
#include <pg_config.h>
|
||||
}
|
||||
|
||||
// for orm
|
||||
$if windows {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue