Where should generated header files be generated to? How can I then export them with catkin?
I have the following CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(datatypes)
find_package(catkin REQUIRED)
catkin_package(
->INCLUDE_DIRS ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}
# LIBRARIES rtdb_config
# CATKIN_DEPENDS other_catkin_pkg
# DEPENDS system_lib
)
file(MAKE_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION})
FILE(GLOB DATATYPE_RAW ${PROJECT_SOURCE_DIR}/datatypes/*)
add_custom_target(${PROJECT_NAME}
ALL
COMMAND generate_some_header_files_to ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION}
SOURCES ${DATATYPE_RAW}
)
Where the custom command generates header files to be used by other packages in the dir ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_INCLUDE_DESTINATION}. (Not sure this dir should be used!!)
The problem seems to be that since this directory was still not created it fails to be exported by catkin_package:
catkin_package() include dir '/home/.../devel/include' is neither an absolute directory nor exists relative to '/home/.../src/rtdb/src/datatypes'
Now the question: Where should generated header files be generated to? How can I then export them with catkin?
Thanks in advance.
Luis