-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
98 lines (73 loc) · 3.38 KB
/
CMakeLists.txt
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Copyright 2006-2010 The FLWOR Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
MESSAGE(STATUS "")
MESSAGE(STATUS "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")
MESSAGE(STATUS "Configuring external module <schema-tools>")
MESSAGE(STATUS "-------------------------------------------------------------")
MESSAGE(STATUS "")
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT (zorba_schema-tools_module)
FIND_PACKAGE (zorba_util-jvm_module QUIET)
INCLUDE ("${zorba_util-jvm_module_USE_FILE}")
INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/config/UtilJavaUse.cmake)
IF (zorba_util-jvm_module_FOUND)
FIND_PACKAGE (Zorba REQUIRED HINTS "${ZORBA_BUILD_DIR}")
INCLUDE ("${Zorba_USE_FILE}")
SET_CMAKE_MODULE_PATH ()
ZORBA_FIND_JNI()
FIND_PACKAGE(Java)
IF (JNI_FOUND)
INCLUDE_DIRECTORIES (${zorba_util-jvm_module_INCLUDE_DIRS})
SET (XMLBEANS_PATHS)
IF (NOT WIN32)
SET (XMLBEANS_PATHS /usr/share/java /usr/share/java/xmlbeans)
ENDIF (NOT WIN32)
FIND_FILE(XMLBEANS_JAR NAMES xmlbeans.jar xbean.jar
PATHS "$ENV{XMLBEANS_HOME}" ${XMLBEANS_PATHS}
PATH_SUFFIXES lib build/lib)
IF( EXISTS ${XMLBEANS_JAR} )
MESSAGE (STATUS "xmlbeans.jar found at: " ${XMLBEANS_JAR} )
# if everything is found build this module
SET (SCHEMA_TOOLS_VERSION 1.0)
ENABLE_TESTING ()
INCLUDE (CTest)
SET_CMAKE_MODULE_PATH ()
FIND_PACKAGE (Zorba REQUIRED HINTS "${ZORBA_BUILD_DIR}")
INCLUDE ("${Zorba_USE_FILE}")
ADD_SUBDIRECTORY ("src")
ADD_SUBDIRECTORY ("srcJava")
ADD_TEST_DIRECTORY("${PROJECT_SOURCE_DIR}/test")
DONE_DECLARING_ZORBA_URIS ()
MESSAGE(STATUS "")
MESSAGE(STATUS "-------------------------------------------------------------")
MESSAGE(STATUS "Configuration SUCCEEDED for external module <schema-tools>")
ELSE( EXISTS ${XMLBEANS_JAR} )
MESSAGE (STATUS "xmlbeans.jar not found; skipping schema-tools module.")
MESSAGE(STATUS "")
MESSAGE(STATUS "-------------------------------------------------------------")
MESSAGE(STATUS "Configuration FAILED for external module <schema-tools>")
ENDIF( EXISTS ${XMLBEANS_JAR} )
ELSE (JNI_FOUND)
MESSAGE (STATUS "Java and/or JNI not found; skipping schema-tools module.")
MESSAGE(STATUS "")
MESSAGE(STATUS "-------------------------------------------------------------")
MESSAGE(STATUS "Configuration FAILED for external module <schema-tools>")
ENDIF (JNI_FOUND)
ELSE (zorba_util-jvm_module_FOUND)
MESSAGE (STATUS "Zorba's util-jvm module not found; skipping schema-tools module.")
MESSAGE(STATUS "")
MESSAGE(STATUS "-------------------------------------------------------------")
MESSAGE(STATUS "Configuration FAILED for external module <schema-tools>")
ENDIF (zorba_util-jvm_module_FOUND)
MESSAGE(STATUS "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++")