Fixes for Xenial. (#103)
- Remove use of get_property(LOCATION in cmake where this is easy. This reduces build warnings sufficiently to not drown out other important information. - Mark cairo a dependency in package.xml so rosdep pulls it in. Tested using docker -t ros:kinetic, which is based on Xenial.master
parent
651a7a23e7
commit
6e6d2decaa
|
@ -70,6 +70,12 @@ google_combined_library(cartographer
|
||||||
SRCS "${ALL_LIBRARIES}"
|
SRCS "${ALL_LIBRARIES}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# TODO(hrapp): Replacing this get_property with a generator expression is not
|
||||||
|
# very easy: it needs to be expanded into a variable which is then used for
|
||||||
|
# CONFIGURE_PACKAGE_CONFIG_FILE - I did not find an easy way to do it. A
|
||||||
|
# complicated way is to file(READ the cartographer-config.cmake.in and
|
||||||
|
# string(CONFIGURE it, then file(GENERATE the output file. I do not have the
|
||||||
|
# stomach to attempt this right now.
|
||||||
get_property(CARTOGRAPHER_LIBRARY_FILE TARGET cartographer PROPERTY LOCATION)
|
get_property(CARTOGRAPHER_LIBRARY_FILE TARGET cartographer PROPERTY LOCATION)
|
||||||
get_filename_component(CARTOGRAPHER_LIBRARY_FILE_BASENAME
|
get_filename_component(CARTOGRAPHER_LIBRARY_FILE_BASENAME
|
||||||
${CARTOGRAPHER_LIBRARY_FILE} NAME)
|
${CARTOGRAPHER_LIBRARY_FILE} NAME)
|
||||||
|
|
|
@ -21,7 +21,6 @@ macro(_parse_arguments ARGS)
|
||||||
USES_EIGEN
|
USES_EIGEN
|
||||||
USES_GFLAGS
|
USES_GFLAGS
|
||||||
USES_GLOG
|
USES_GLOG
|
||||||
USES_GLOG
|
|
||||||
USES_LUA
|
USES_LUA
|
||||||
USES_WEBP
|
USES_WEBP
|
||||||
USES_CAIRO
|
USES_CAIRO
|
||||||
|
@ -179,25 +178,22 @@ function(google_combined_library NAME)
|
||||||
DEPENDS ${ARG_SRCS}
|
DEPENDS ${ARG_SRCS}
|
||||||
)
|
)
|
||||||
|
|
||||||
get_property(OUTPUT_FILE TARGET ${NAME} PROPERTY LOCATION)
|
|
||||||
|
|
||||||
# We will delete the static lib generated by the last call to
|
# We will delete the static lib generated by the last call to
|
||||||
# 'google_library' and recreate it using a GNU ar script that combines the
|
# 'google_library' and recreate it using a GNU ar script that combines the
|
||||||
# SRCS into the NAME.
|
# SRCS into the NAME.
|
||||||
# TODO(hrapp): this is probably not very portable, but should work fine on
|
# TODO(hrapp): this is probably not very portable, but should work fine on
|
||||||
# Linux.
|
# Linux.
|
||||||
set(AR_SCRIPT "")
|
set(AR_SCRIPT "")
|
||||||
set(AR_SCRIPT "CREATE ${OUTPUT_FILE}\n")
|
set(AR_SCRIPT "CREATE $<TARGET_FILE:${NAME}>\n")
|
||||||
foreach(SRC ${ARG_SRCS})
|
foreach(SRC ${ARG_SRCS})
|
||||||
get_property(STATIC_LIBRARY_FILE TARGET ${SRC} PROPERTY LOCATION)
|
set(AR_SCRIPT "${AR_SCRIPT}ADDLIB $<TARGET_FILE:${SRC}>\n")
|
||||||
set(AR_SCRIPT "${AR_SCRIPT}ADDLIB ${STATIC_LIBRARY_FILE}\n")
|
|
||||||
endforeach()
|
endforeach()
|
||||||
set(AR_SCRIPT "${AR_SCRIPT}SAVE\nEND\n")
|
set(AR_SCRIPT "${AR_SCRIPT}SAVE\nEND\n")
|
||||||
set(AR_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${NAME}_ar.script")
|
set(AR_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${NAME}_ar.script")
|
||||||
file(WRITE ${AR_SCRIPT_FILE} ${AR_SCRIPT})
|
file(GENERATE OUTPUT ${AR_SCRIPT_FILE} CONTENT ${AR_SCRIPT})
|
||||||
|
|
||||||
add_custom_command(TARGET ${NAME} POST_BUILD
|
add_custom_command(TARGET ${NAME} POST_BUILD
|
||||||
COMMAND rm ${OUTPUT_FILE}
|
COMMAND rm $<TARGET_FILE:${NAME}>
|
||||||
COMMAND ${CMAKE_AR}
|
COMMAND ${CMAKE_AR}
|
||||||
ARGS -M < ${AR_SCRIPT_FILE}
|
ARGS -M < ${AR_SCRIPT_FILE}
|
||||||
COMMENT "Recombining static libraries into ${NAME}."
|
COMMENT "Recombining static libraries into ${NAME}."
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
<depend>boost</depend>
|
<depend>boost</depend>
|
||||||
<depend>ceres_solver</depend>
|
<depend>ceres_solver</depend>
|
||||||
<depend>eigen</depend>
|
<depend>eigen</depend>
|
||||||
|
<depend>libcairo2-dev</depend>
|
||||||
<depend>libgflags-dev</depend>
|
<depend>libgflags-dev</depend>
|
||||||
<depend>libgoogle-glog-dev</depend>
|
<depend>libgoogle-glog-dev</depend>
|
||||||
<depend>libwebp-dev</depend>
|
<depend>libwebp-dev</depend>
|
||||||
|
|
Loading…
Reference in New Issue