-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
70 lines (56 loc) · 2.35 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
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
# ---------------------------------------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(uimacpp_ros)
FIND_PACKAGE(catkin REQUIRED)
ADD_DEFINITIONS(-DUIMA_VERSION=2.4.1)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
ADD_DEFINITIONS(-DCOMPILEDWITHC11)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -DNDEBUG -DTRACEOFF -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG -DTRACEOFF -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE")
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
FIND_PACKAGE(XercesC)
IF(XercesC_FOUND)
INCLUDE_DIRECTORIES(${XercesC_INCLUDE_DIRS})
ELSE()
MESSAGE(FATAL_ERROR "XercesC library not found")
ENDIF(XercesC_FOUND)
FIND_PACKAGE(APR)
IF(APR_FOUND)
INCLUDE_DIRECTORIES(${APR_INCLUDE_DIR}, ${APRUTIL_INCLUDE_DIR})
ELSE()
MESSAGE(FATAL_ERROR "APR library not found")
ENDIF(APR_FOUND)
FIND_PACKAGE(JNI)
IF(JNI_FOUND)
INCLUDE_DIRECTORIES(${JNI_INCLUDE_DIRS})
ELSE()
MESSAGE(FATAL_ERROR "JNI library not found")
ENDIF(JNI_FOUND)
FIND_PACKAGE(ICU)
IF(ICU_FOUND)
INCLUDE_DIRECTORIES(${ICU_INCLUDE_DIRS})
ELSE()
MESSAGE(FATAL_ERROR "ICU library not found")
ENDIF(ICU_FOUND)
# Set exported headers and libs
catkin_package(
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/cas/include ${CMAKE_CURRENT_SOURCE_DIR}/src/framework/include ${CMAKE_CURRENT_SOURCE_DIR}/src/jni/include
LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS
DEPENDS XercesC APR JNI ICU)
ADD_SUBDIRECTORY(src)