Renamed uresourcegenerator tool to rtabmap-res_tool

This commit is contained in:
matlabbe
2016-01-23 17:04:30 -05:00
parent c20bebd3f0
commit 8dc01c491b
2 changed files with 30 additions and 20 deletions
+15 -10
View File
@@ -224,22 +224,27 @@ SET(RESOURCES_HEADERS
) )
IF(ANDROID) IF(ANDROID)
IF(NOT URESOURCEGENERATOR)
MESSAGE( FATAL_ERROR "URESOURCEGENERATOR is not defined (it should point out on \"uresourcegenerator\" application created by a non-Android build), CMake will exit." ) IF(NOT RTABMAP_RES_TOOL)
ENDIF(NOT URESOURCEGENERATOR) find_host_program(RTABMAP_RES_TOOL rtabmap-res_tool)
ADD_CUSTOM_COMMAND( IF(NOT RTABMAP_RES_TOOL)
MESSAGE( FATAL_ERROR "RTABMAP_RES_TOOL is not defined (it is the path to \"rtabmap-res_tool\" application created by a non-Android build)." )
ENDIF(NOT RTABMAP_RES_TOOL)
ENDIF(NOT RTABMAP_RES_TOOL)
ADD_CUSTOM_COMMAND(
OUTPUT ${RESOURCES_HEADERS} OUTPUT ${RESOURCES_HEADERS}
COMMAND ${URESOURCEGENERATOR} -n rtabmap -p ${CMAKE_CURRENT_BINARY_DIR} ${RESOURCES} COMMAND ${RTABMAP_RES_TOOL} -n rtabmap -p ${CMAKE_CURRENT_BINARY_DIR} ${RESOURCES}
COMMENT "[Creating resources]" COMMENT "[Creating resources]"
DEPENDS ${R} DEPENDS ${R}
) )
ELSE() ELSE()
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
OUTPUT ${RESOURCES_HEADERS} OUTPUT ${RESOURCES_HEADERS}
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/uresourcegenerator -n rtabmap -p ${CMAKE_CURRENT_BINARY_DIR} ${RESOURCES} COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/rtabmap-res_tool -n rtabmap -p ${CMAKE_CURRENT_BINARY_DIR} ${RESOURCES}
COMMENT "[Creating resources]" COMMENT "[Creating resources]"
DEPENDS ${R} uresourcegenerator DEPENDS ${R} res_tool
) )
ENDIF() ENDIF()
#################################### ####################################
+8 -3
View File
@@ -12,12 +12,17 @@ INCLUDE_DIRECTORIES(${INCLUDE_DIRS})
# Add binary called "resource_tool" that is built from the source file "main.cpp". # Add binary called "resource_tool" that is built from the source file "main.cpp".
# The extension is automatically found. # The extension is automatically found.
ADD_EXECUTABLE(uresourcegenerator ${SRC_FILES}) ADD_EXECUTABLE(res_tool ${SRC_FILES})
TARGET_LINK_LIBRARIES(uresourcegenerator rtabmap_utilite) TARGET_LINK_LIBRARIES(res_tool rtabmap_utilite)
SET_TARGET_PROPERTIES( SET_TARGET_PROPERTIES(
uresourcegenerator res_tool
PROPERTIES PROPERTIES
VERSION ${UTILITE_VERSION} VERSION ${UTILITE_VERSION}
SOVERSION ${UTILITE_VERSION} SOVERSION ${UTILITE_VERSION}
OUTPUT_NAME ${PROJECT_PREFIX}-res_tool
) )
INSTALL(TARGETS res_tool
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT runtime
BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}" COMPONENT runtime)