forked from ethz-asl/glog_catkin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
30 lines (25 loc) · 1.02 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
cmake_minimum_required(VERSION 2.8.3)
project(glog_catkin)
find_package(catkin_simple REQUIRED)
catkin_simple()
include(ExternalProject)
file(MAKE_DIRECTORY ${CATKIN_DEVEL_PREFIX}/include)
set(VERSION 0.3.5)
ExternalProject_Add(glog_src
URL https://github.com/google/glog/archive/v${VERSION}.zip
UPDATE_COMMAND ""
PATCH_COMMAND patch -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/fix-unused-typedef-warning.patch
CONFIGURE_COMMAND cd ../glog_src/ && autoreconf -fi && ./configure --with-pic
--with-gflags=${gflags_catkin_PREFIX}
--prefix=${CATKIN_DEVEL_PREFIX}
BUILD_COMMAND cd ../glog_src/ && make -j 8
INSTALL_COMMAND cd ../glog_src/ && make install -j 8
)
install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/include/glog
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h")
install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/lib/
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
FILES_MATCHING PATTERN "libglog*")
cs_export(INCLUDE_DIRS ${CATKIN_DEVEL_PREFIX}/include
LIBRARIES glog)