File tree 5 files changed +9
-17
lines changed
5 files changed +9
-17
lines changed Original file line number Diff line number Diff line change 44
44
- name : Install dependencies
45
45
run : |
46
46
sudo apt-get update -y
47
- sudo apt-get install -y wget git gawk findutils ninja-build libpq-dev
47
+ sudo apt-get install -y wget git gawk findutils ninja-build libpq-dev unixodbc-dev
48
48
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
49
49
sudo apt-get install -y --no-install-recommends --no-install-suggests
50
50
- name : Print build environment variables
60
60
run : |
61
61
cmake ${CMAKE_OPTIONS} -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -G Ninja \
62
62
-DCMAKE_INSTALL_PREFIX=$HOME/install -DWITH_NLS=OFF -DWITH_GUI=OFF -DWITH_DOCS=OFF \
63
- -DWITH_READLINE=ON
63
+ -DWITH_READLINE=ON -DWITH_ODBC=ON
64
64
- name : Print CMakeCache.txt
65
65
shell : bash -el {0}
66
66
run : |
Original file line number Diff line number Diff line change @@ -101,9 +101,7 @@ option(WITH_LIBPNG "Build with libpng support ." ON)
101
101
option (WITH_SQLITE "Build with SQLite support" ON )
102
102
option (WITH_POSTGRES "Build with Postgres support" ON )
103
103
option (WITH_MYSQL "Build with MySQL support" OFF )
104
- if (WIN32 )
105
- option (WITH_ODBC "Build with ODBC support" OFF )
106
- endif ()
104
+ option (WITH_ODBC "Build with ODBC support" OFF )
107
105
option (WITH_ZSTD "Build with zstd support" ON )
108
106
option (WITH_BZLIB "Build with bzlib support" OFF )
109
107
Original file line number Diff line number Diff line change @@ -127,15 +127,8 @@ if(WITH_MYSQL)
127
127
endif ()
128
128
endif ()
129
129
130
- if (WITH_ODBC AND WIN32 )
131
- find_package (ODBC QUIET )
132
- if (ODBC_FOUND)
133
- add_library (ODBC INTERFACE IMPORTED GLOBAL )
134
- #[[
135
- set_property(TARGET ODBC PROPERTY INTERFACE_LINK_LIBRARIES ${ODBC_LIBRARIES})
136
- set_property(TARGET PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${ODBC_INCLUDE_DIRS})
137
- #]]
138
- endif ()
130
+ if (WITH_ODBC)
131
+ find_package (ODBC REQUIRED)
139
132
endif ()
140
133
141
134
if (WITH_ZSTD)
@@ -326,7 +319,7 @@ check_target(SQLite::SQLite3 HAVE_SQLITE3_H)
326
319
check_target(PostgreSQL::PostgreSQL HAVE_POSTGRES)
327
320
check_target(PostgreSQL::PostgreSQL HAVE_LIBPQ_FE_H)
328
321
check_target(MYSQL HAVE_MYSQL_H)
329
- check_target(ODBC HAVE_SQL_H)
322
+ check_target(ODBC::ODBC HAVE_SQL_H)
330
323
check_target(ZSTD HAVE_ZSTD_H)
331
324
check_target(BZIP2 HAVE_BZLIB_H)
332
325
check_target(Readline::Readline HAVE_READLINE_READLINE_H)
Original file line number Diff line number Diff line change @@ -80,12 +80,13 @@ build_program_in_subdir(
80
80
DEPENDS
81
81
grass_gis
82
82
grass_dbstubs
83
+ grass_dbmibase
83
84
grass_dbmidriver
84
85
grass_sqlp
85
86
DEFS
86
87
"${grass_dbstubs_DEFS} "
87
88
PRIMARY_DEPENDS
88
- ODBC
89
+ ODBC::ODBC
89
90
HTML_FILE_NAME
90
91
grass-odbc
91
92
RUNTIME_OUTPUT_DIR
Original file line number Diff line number Diff line change 138
138
#cmakedefine HAVE_NICE ${HAVE_NICE}
139
139
140
140
/* Define to 1 if OGR is to be used. */
141
- #cmakedefine HAVE_OGR {HAVE_OGR}
141
+ #cmakedefine HAVE_OGR $ {HAVE_OGR}
142
142
143
143
/* Define to 1 if you have the <omp.h> header file. */
144
144
#cmakedefine HAVE_OMP_H ${HAVE_OMP_H}
You can’t perform that action at this time.
0 commit comments