Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

refactor to generate pkg-msg-paths.cmake via configure_file() instead…

… of empy (#43)
  • Loading branch information...
commit f7c45310e48e193ebea76bbd279aac6deeda1932 1 parent 99c8877
@dirk-thomas dirk-thomas authored
View
4 CMakeLists.txt
@@ -9,8 +9,8 @@ install(
cmake/pkg-genmsg.cmake.em
cmake/pkg-genmsg.context.in
cmake/pkg-msg-extras.cmake.in
- cmake/pkg-msg-paths.cmake.em
- cmake/pkg-msg-paths.context.in
+ cmake/pkg-msg-paths.cmake.develspace.in
+ cmake/pkg-msg-paths.cmake.installspace.in
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake)
catkin_python_setup()
View
20 cmake/genmsg-extras.cmake.em
@@ -215,21 +215,17 @@ macro(generate_messages)
catkin_destinations()
# generate devel space config of message include dirs for project
- set(DEVELSPACE TRUE)
- set(INSTALLSPACE FALSE)
set(PKG_MSG_INCLUDE_DIRS "${${PROJECT_NAME}_MSG_INCLUDE_DIRS_DEVELSPACE}")
- em_expand(${genmsg_CMAKE_DIR}/pkg-msg-paths.context.in
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/${PROJECT_NAME}-msg-paths-context.py
- ${genmsg_CMAKE_DIR}/pkg-msg-paths.cmake.em
- ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${PROJECT_NAME}-msg-paths.cmake)
+ configure_file(
+ ${genmsg_CMAKE_DIR}/pkg-msg-paths.cmake.develspace.in
+ ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${PROJECT_NAME}-msg-paths.cmake
+ @@ONLY)
# generate and install config of message include dirs for project
- set(DEVELSPACE FALSE)
- set(INSTALLSPACE TRUE)
set(PKG_MSG_INCLUDE_DIRS "${${PROJECT_NAME}_MSG_INCLUDE_DIRS_INSTALLSPACE}")
- em_expand(${genmsg_CMAKE_DIR}/pkg-msg-paths.context.in
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}-msg-paths-context.py
- ${genmsg_CMAKE_DIR}/pkg-msg-paths.cmake.em
- ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}-msg-paths.cmake)
+ configure_file(
+ ${genmsg_CMAKE_DIR}/pkg-msg-paths.cmake.installspace.in
+ ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}-msg-paths.cmake
+ @@ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${PROJECT_NAME}-msg-paths.cmake
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake)
View
4 cmake/pkg-msg-paths.cmake.develspace.in
@@ -0,0 +1,4 @@
+# generated from genmsg/cmake/pkg-msg-paths.cmake.develspace.in
+
+set(@PROJECT_NAME@_MSG_INCLUDE_DIRS "@PKG_MSG_INCLUDE_DIRS@")
+set(@PROJECT_NAME@_MSG_DEPENDENCIES @ARG_DEPENDENCIES@)
View
10 cmake/pkg-msg-paths.cmake.em
@@ -1,10 +0,0 @@
-# generated from genmsg/cmake/pkg-msg-paths.cmake.em
-
-@[if DEVELSPACE]@
-# message include dirs in develspace
-set(@(PROJECT_NAME)_MSG_INCLUDE_DIRS "@(PKG_MSG_INCLUDE_DIRS)")
-@[else]@
-# message include dirs in installspace
-_prepend_path("${@(PROJECT_NAME)_DIR}/.." "@(PKG_MSG_INCLUDE_DIRS)" @(PROJECT_NAME)_MSG_INCLUDE_DIRS UNIQUE)
-@[end if]@
-set(@(PROJECT_NAME)_MSG_DEPENDENCIES @(ARG_DEPENDENCIES))
View
4 cmake/pkg-msg-paths.cmake.installspace.in
@@ -0,0 +1,4 @@
+# generated from genmsg/cmake/pkg-msg-paths.cmake.installspace.in
+
+_prepend_path("${@PROJECT_NAME@_DIR}/.." "@PKG_MSG_INCLUDE_DIRS@" @PROJECT_NAME@_MSG_INCLUDE_DIRS UNIQUE)
+set(@PROJECT_NAME@_MSG_DEPENDENCIES @ARG_DEPENDENCIES@)
View
8 cmake/pkg-msg-paths.context.in
@@ -1,8 +0,0 @@
-# generated from genmsg/cmake/pkg-msg-paths.context.in
-
-DEVELSPACE = '@DEVELSPACE@' == 'TRUE'
-INSTALLSPACE = '@INSTALLSPACE@' == 'TRUE'
-
-PROJECT_NAME = '@PROJECT_NAME@'
-PKG_MSG_INCLUDE_DIRS = '@PKG_MSG_INCLUDE_DIRS@'
-ARG_DEPENDENCIES = '@ARG_DEPENDENCIES@'
Please sign in to comment.
Something went wrong with that request. Please try again.