annotate Resources/CMake/UnixOdbcConfiguration.cmake @ 375:824d70ce85ff db-protobuf

implemented database operations
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 28 Mar 2023 18:11:27 +0200
parents 16aac0287485
children 3d6886f3e5b3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 # Orthanc - A Lightweight, RESTful DICOM Store
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 # Department, University Hospital of Liege, Belgium
359
16aac0287485 copyright upgraded to 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 334
diff changeset
4 # Copyright (C) 2017-2022 Osimis S.A., Belgium
16aac0287485 copyright upgraded to 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 334
diff changeset
5 # Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 #
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 # This program is free software: you can redistribute it and/or
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 # modify it under the terms of the GNU Affero General Public License
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 # as published by the Free Software Foundation, either version 3 of
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 # the License, or (at your option) any later version.
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 #
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 # This program is distributed in the hope that it will be useful, but
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 # Affero General Public License for more details.
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 #
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 # You should have received a copy of the GNU Affero General Public License
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 if (STATIC_BUILD OR NOT USE_SYSTEM_UNIX_ODBC)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 include(CheckFunctionExists)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 include(CheckTypeSize)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 set(VERSION "2.3.9") # Used in "config.h.in"
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 set(UNIX_ODBC_SOURCES_DIR ${CMAKE_BINARY_DIR}/unixODBC-${VERSION})
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 set(UNIX_ODBC_MD5 "06f76e034bb41df5233554abe961a16f")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 set(UNIX_ODBC_URL "http://orthanc.osimis.io/ThirdPartyDownloads/unixODBC-${VERSION}.tar.gz")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 DownloadPackage(${UNIX_ODBC_MD5} ${UNIX_ODBC_URL} "${UNIX_ODBC_SOURCES_DIR}")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 if (STATIC_BUILD OR NOT USE_SYSTEM_LTDL)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 add_definitions(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 -DLT_OBJDIR=".libs/"
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 -DLTDL # Necessary for LT_SCOPE to be properly defined
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 #-DLT_DEBUG_LOADERS # Get debug messages
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39 include_directories(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 ${UNIX_ODBC_SOURCES_DIR}/libltdl
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 ${UNIX_ODBC_SOURCES_DIR}/libltdl/libltdl/
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 list(APPEND LTDL_SOURCES
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 ${UNIX_ODBC_SOURCES_DIR}/libltdl/loaders/dlopen.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 ${UNIX_ODBC_SOURCES_DIR}/libltdl/loaders/preopen.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 ${UNIX_ODBC_SOURCES_DIR}/libltdl/lt__alloc.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 ${UNIX_ODBC_SOURCES_DIR}/libltdl/lt__strl.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49 ${UNIX_ODBC_SOURCES_DIR}/libltdl/lt_dlloader.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 ${UNIX_ODBC_SOURCES_DIR}/libltdl/lt_error.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 ${UNIX_ODBC_SOURCES_DIR}/libltdl/ltdl.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 ${UNIX_ODBC_SOURCES_DIR}/libltdl/slist.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 )
334
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
54
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
55 if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
56 set(OSXHEADER 1)
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
57 set(__error_t_defined 1)
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
58 set(error_t int)
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
59
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
60 # NB: The lines below might also be used for compatibility with
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
61 # LSB target version 4.0 instead of 5.0 (untested)
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
62 configure_file(
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
63 ${UNIX_ODBC_SOURCES_DIR}/libltdl/libltdl/lt__argz_.h
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
64 ${UNIX_ODBC_SOURCES_DIR}/libltdl/libltdl/lt__argz.h
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
65 COPYONLY)
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
66 list(APPEND LTDL_SOURCES
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
67 ${UNIX_ODBC_SOURCES_DIR}/libltdl/lt__argz.c
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
68 )
75ff5ce4a995 fix odbc build for OSX
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 329
diff changeset
69 endif()
329
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 else()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 check_include_file("libltdl/lt_dlloader.h" HAVE_LT_DLLOADER_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 if (NOT HAVE_LT_DLLOADER_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 message(FATAL_ERROR "Please install the libltdl-dev package")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 link_libraries(ltdl)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 include_directories(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81 ${CMAKE_CURRENT_BINARY_DIR}/AUTOGENERATED
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82 ${UNIX_ODBC_SOURCES_DIR}/include
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 ${UNIX_ODBC_SOURCES_DIR}/DriverManager
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 file(GLOB UNIX_ODBC_SOURCES
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87 ${UNIX_ODBC_SOURCES_DIR}/cur/*.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88 ${UNIX_ODBC_SOURCES_DIR}/DriverManager/*.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89 ${UNIX_ODBC_SOURCES_DIR}/odbcinst/*.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 ${UNIX_ODBC_SOURCES_DIR}/ini/*.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 ${UNIX_ODBC_SOURCES_DIR}/log/*.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92 ${UNIX_ODBC_SOURCES_DIR}/lst/*.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 list(REMOVE_ITEM UNIX_ODBC_SOURCES
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 ${UNIX_ODBC_SOURCES_DIR}/cur/SQLConnect.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 ${UNIX_ODBC_SOURCES_DIR}/cur/SQLGetDiagRec.c
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 set(ASCII_ENCODING "auto-search")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 set(SYSTEM_FILE_PATH "/etc")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 set(DEFLIB_PATH "/usr/lib")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 set(ENABLE_DRIVER_ICONV ON) # Enables support for encodings
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 set(STDC_HEADERS 1)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 set(UNIXODBC ON)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 set(UNIXODBC_SOURCE ON) # This makes "intptr_t" to be defined
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 set(ICONV_CONST ON)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 set(STRICT_ODBC_ERROR ON)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 set(PLATFORM64 1)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 list(GET CMAKE_FIND_LIBRARY_SUFFIXES 0 SHLIBEXT)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118 check_include_file("alloca.h" HAVE_ALLOCA_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 check_include_file("argz.h" HAVE_ARGZ_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 check_include_file("crypt.h" HAVE_CRYPT_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 check_include_file("dirent.h" HAVE_DIRENT_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 check_include_file("dlfcn.h" HAVE_DLFCN_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 check_include_file("inttypes.h" HAVE_INTTYPES_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 check_include_file("langinfo.h" HAVE_LANGINFO_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 check_include_file("crypt.h" HAVE_CRYPT_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 check_include_file("limits.h" HAVE_LIMITS_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 check_include_file("locale.h" HAVE_LOCALE_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 check_include_file("malloc.h" HAVE_MALLOC_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 check_include_file("memory.h" HAVE_MEMORY_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 check_include_file("pwd.h" HAVE_PWD_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 check_include_file("stdarg.h" HAVE_STDARG_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 check_include_file("stdlib.h" HAVE_STDLIB_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 check_include_file("string.h" HAVE_STRING_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 check_include_file("strings.h" HAVE_STRINGS_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135 check_include_file("time.h" HAVE_TIME_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136 check_include_file("sys/sem.h" HAVE_SYS_SEM_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 check_include_file("sys/time.h" HAVE_SYS_TIME_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139 check_include_file("sys/timeb.h" HAVE_SYS_TIMEB_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 check_include_file("unistd.h" HAVE_UNISTD_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 check_include_file("readline/readline.h" HAVE_READLINE_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 check_include_file("readline/history.h" HAVE_READLINE_HISTORY_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144 check_symbol_exists(alloca "alloca.h" HAVE_ALLOCA)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 check_symbol_exists(argz_add "argz.h" HAVE_ARGZ_ADD)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 check_symbol_exists(argz_append "argz.h" HAVE_ARGZ_APPEND)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 check_symbol_exists(argz_count "argz.h" HAVE_ARGZ_COUNT)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 check_symbol_exists(argz_create_sep "argz.h" HAVE_ARGZ_CREATE_SEP)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 check_symbol_exists(argz_insert "argz.h" HAVE_ARGZ_INSERT)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 check_symbol_exists(argz_next "argz.h" HAVE_ARGZ_NEXT)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 check_symbol_exists(argz_stringify "argz.h" HAVE_ARGZ_STRINGIFY)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 check_function_exists(atoll HAVE_ATOLL)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 check_function_exists(closedir HAVE_CLOSEDIR)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 check_function_exists(endpwent HAVE_ENDPWENT)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 if (HAVE_ARGZ_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 set(HAVE_WORKING_ARGZ 1)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 find_package(Threads)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 if (Threads_FOUND)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 set(HAVE_LIBPTHREAD 1)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 endif ()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 set(CMAKE_REQUIRED_LIBRARIES)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 if (HAVE_DLFCN_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 list(APPEND CMAKE_REQUIRED_LIBRARIES "dl")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 if (HAVE_CRYPT_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 list(APPEND CMAKE_REQUIRED_LIBRARIES "crypt")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 if (HAVE_READLINE_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 list(APPEND CMAKE_REQUIRED_LIBRARIES "readline")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176 if (HAVE_LT_DLLOADER_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 set(HAVE_LIBDLLOADER 0) # to improve
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 set(HAVE_LTDL 1) # to improve
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 check_function_exists(dlerror HAVE_DLERROR)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 check_function_exists(dlloader_init HAVE_LIBDLLOADER)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 check_function_exists(dlopen HAVE_LIBDL)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 check_function_exists(encrypt HAVE_LIBCRYPT)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 check_function_exists(ftime HAVE_FTIME)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 check_function_exists(getpwuid HAVE_GETPWUID)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188 check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 check_function_exists(getuid HAVE_GETUID)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190 check_function_exists(iconv HAVE_ICONV)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 check_function_exists(localtime_r HAVE_LOCALTIME_R)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 check_function_exists(opendir HAVE_OPENDIR)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 check_function_exists(putenv HAVE_PUTENV)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 check_function_exists(readdir HAVE_READDIR)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 check_function_exists(readline HAVE_READLINE)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 check_function_exists(setenv HAVE_SETENV)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 check_function_exists(setlocale HAVE_SETLOCALE)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 check_function_exists(socket HAVE_SOCKET)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 check_function_exists(strcasecmp HAVE_STRCASECMP)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 check_function_exists(strchr HAVE_STRCHR)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 check_function_exists(strdup HAVE_STRDUP)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 check_function_exists(strncasecmp HAVE_STRNCASECMP)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203 check_function_exists(strstr HAVE_STRSTR)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 check_function_exists(strtol HAVE_STRTOL)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205 check_function_exists(strtoll HAVE_STRTOLL)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 check_function_exists(time HAVE_TIME)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 check_function_exists(vprintf HAVE_VPRINTF)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 check_function_exists(vsnprintf HAVE_VSNPRINTF)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 set(CMAKE_EXTRA_INCLUDE_FILES)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 if (HAVE_ARGZ_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 list(APPEND CMAKE_EXTRA_INCLUDE_FILES "argz.h")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 check_type_size("long" SIZEOF_LONG)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 check_type_size("long int" SIZEOF_LONG_INT)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218 check_type_size("error_t" HAVE_ERROR_T)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219 if (DEFINED HAVE_ERROR_T)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 set(HAVE_ERROR_T 1)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223 check_type_size("long long" HAVE_LONG_LONG)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 if (DEFINED HAVE_LONG_LONG)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 set(HAVE_LONG_LONG 1)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 check_type_size("nl_langinfo" HAVE_LANGINFO_CODESET)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 if (DEFINED HAVE_LANGINFO_CODESET)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230 set(HAVE_LANGINFO_CODESET 1) # to improve
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231 set(HAVE_NL_LANGINFO 1)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 check_type_size("ptrdiff_t" HAVE_PTRDIFF_T)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 if (DEFINED HAVE_PTRDIFF_T)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 set(HAVE_PTRDIFF_T 1)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
238
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
239 configure_file(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 ${CMAKE_CURRENT_LIST_DIR}/../Odbc/config.h.in
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 ${CMAKE_CURRENT_BINARY_DIR}/AUTOGENERATED/config.h
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
242 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
243
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
244 configure_file(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
245 ${CMAKE_CURRENT_LIST_DIR}/../Odbc/config.h.in
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
246 ${CMAKE_CURRENT_BINARY_DIR}/AUTOGENERATED/unixodbc_conf.h
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
247 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
248
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
249 add_definitions(
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
250 -DHAVE_CONFIG_H=1
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
251 )
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
252
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
253 else()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
254 check_include_file("sqlext.h" HAVE_UNIX_ODBC_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
255 if (NOT HAVE_UNIX_ODBC_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
256 message(FATAL_ERROR "Please install the unixodbc-dev package")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
257 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
258
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
259 check_include_file("libltdl/lt_dlloader.h" HAVE_LT_DLLOADER_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
260 if (NOT HAVE_LT_DLLOADER_H)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
261 message(FATAL_ERROR "Please install the libltdl-dev package")
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
262 endif()
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
263
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
264 link_libraries(odbc ltdl)
b5fb8b77ce4d initial commit of ODBC framework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
265 endif()