forked from tumi8/vermont
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFindOracle.cmake
54 lines (45 loc) · 2.02 KB
/
FindOracle.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# - Find Oracle
# Find the Oracle includes and client library
# This module defines
# ORACLE_INCLUDE_DIR, where to find occi.h
# ORACLE_LIBRARIES, the libraries needed to use ORACLE.
# ORACLE_FOUND, If false, do not try to use Oracle.
#
# Copyright (c) 2011, Philipp Fehre, <[email protected]>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# Add the oracle include paths here
if(ORACLE_INCLUDE_DIR AND ORACLE_CLIENT_LIBRARIES AND ORACLE_CONNECTION_LIBRARIES)
set(ORACLE_FOUND TRUE)
else(ORACLE_INCLUDE_DIR AND ORACLE_CLIENT_LIBRARIES AND ORACLE_CONNECTION_LIBRARIES)
find_path(ORACLE_INCLUDE_DIR occi.h
/usr/lib/oracle/xe/app/oracle/product/*/client/rdbms/public
/usr/include/oracle/*/client
/opt/oracle/product/*/client/rdbms/public
/opt/oracle/*/client/
)
find_library(ORACLE_CLIENT_LIBRARIES NAMES clntsh libclntsh
PATHS
/usr/lib/oracle/xe/app/oracle/product/*/client/lib
/usr/lib/oracle/*/client/lib
/opt/oracle/product/*/client/lib
/opt/oracle/*/client/lib
)
find_library(ORACLE_CONNECTION_LIBRARIES NAMES occi libocci
PATHS
/usr/lib/oracle/xe/app/oracle/product/*/client/lib
/usr/lib/oracle/*/client/lib
/opt/oracle/product/*/client/lib
/opt/oracle/*/client/lib
)
if(ORACLE_INCLUDE_DIR AND ORACLE_CLIENT_LIBRARIES AND ORACLE_CONNECTION_LIBRARIES)
set(ORACLE_FOUND TRUE)
message(STATUS "Found Oracle: ${ORACLE_INCLUDE_DIR}, ${ORACLE_CLIENT_LIBRARIES}, ${ORACLE_CONNECTION_LIBRARIES}")
INCLUDE_DIRECTORIES(${ORACLE_INCLUDE_DIR})
else(ORACLE_INCLUDE_DIR AND ORACLE_CLIENT_LIBRARIES AND ORACLE_CONNECTION_LIBRARIES)
set(ORACLE_FOUND FALSE)
message(STATUS "Oracle not found.")
endif(ORACLE_INCLUDE_DIR AND ORACLE_CLIENT_LIBRARIES AND ORACLE_CONNECTION_LIBRARIES)
mark_as_advanced(ORACLE_INCLUDE_DIR ORACLE_CLIENT_LIBRARIES ORACLE_CONNECTION_LIBRARIES )
endif(ORACLE_INCLUDE_DIR AND ORACLE_CLIENT_LIBRARIES AND ORACLE_CONNECTION_LIBRARIES)