[openrtm-commit:00936] r377 - in trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake: . cmake include src
openrtm @ openrtm.org
openrtm @ openrtm.org
2013年 1月 23日 (水) 19:29:16 JST
Author: sakamoto
Date: 2013-01-23 19:29:16 +0900 (Wed, 23 Jan 2013)
New Revision: 377
Modified:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/cmake/utils.in.vsl
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncModuleCMakeLists.txt.vsl
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncludeCMakeLists.txt.vsl
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/src/SrcCMakeLists.txt.vsl
Log:
Modified CMakeFile
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl 2013-01-07 14:12:21 UTC (rev 376)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl 2013-01-23 10:29:16 UTC (rev 377)
@@ -58,21 +58,29 @@
if(BUILD_DOCUMENTATION)
add_subdirectory(doc)
endif(BUILD_DOCUMENTATION)
+
${sharp}if(BUILD_EXAMPLES)
${sharp} add_subdirectory(examples)
${sharp}endif(BUILD_EXAMPLES)
+
if(BUILD_IDL)
add_subdirectory(idl)
endif(BUILD_IDL)
+
add_subdirectory(include)
+MAP_ADD_STR(headers "include/" comp_hdrs)
add_subdirectory(src)
+
${sharp}if(BUILD_TESTS)
${sharp} add_subdirectory(test)
${sharp}endif(BUILD_TESTS)
+
${sharp}if(BUILD_TOOLS)
${sharp} add_subdirectory(tools)
${sharp}endif(BUILD_TOOLS)
+
if(BUILD_SOURCES)
+ add_subdirectory(include)
add_subdirectory(src)
endif(BUILD_SOURCES)
@@ -80,9 +88,12 @@
include(InstallRequiredSystemLibraries)
set(PROJECT_EXECUTABLES ${dol}{PROJECT_NAME_LOWER}Comp
"${dol}{PROJECT_NAME_LOWER}Comp")
+
set(cpack_options "${dol}{PROJECT_BINARY_DIR}/cpack_options.cmake")
+
configure_file("${dol}{PROJECT_SOURCE_DIR}/cmake/cpack_options.cmake.in"
${dol}{cpack_options} @ONLY)
+
set(CPACK_PROJECT_CONFIG_FILE ${dol}{cpack_options})
include(${dol}{CPACK_PROJECT_CONFIG_FILE})
include(CPack)
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/cmake/utils.in.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/cmake/utils.in.vsl 2013-01-07 14:12:21 UTC (rev 376)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/cmake/utils.in.vsl 2013-01-23 10:29:16 UTC (rev 377)
@@ -17,10 +17,16 @@
${sharp} output is placed in the variable pointed at by _output.
macro(FILTER_LIST _list _pattern _output)
set(${dol}{_output})
- foreach(_item ${dol}{_list})
+ foreach(_item ${dol}{${dol}{_list}})
if("${dol}{_item}" MATCHES ${dol}{_pattern})
set(${dol}{_output} ${dol}{${dol}{_output}} ${dol}{_item})
endif("${dol}{_item}" MATCHES ${dol}{_pattern})
endforeach(_item)
endmacro(FILTER_LIST)
+macro(MAP_ADD_STR _list _str _output)
+ set(${dol}{_output})
+ foreach(_item ${dol}{${dol}{_list}})
+ set(${dol}{_output} ${dol}{${dol}{_output}} ${dol}{_str}${dol}{_item})
+ endforeach(_item)
+endmacro(MAP_ADD_STR)
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncModuleCMakeLists.txt.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncModuleCMakeLists.txt.vsl 2013-01-07 14:12:21 UTC (rev 376)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncModuleCMakeLists.txt.vsl 2013-01-23 10:29:16 UTC (rev 377)
@@ -1,4 +1,5 @@
set(hdrs ${rtcParam.name}.h
+ PARENT_SCOPE
#foreach($providerIdlFile in ${rtcParam.providerIdlPathes})
${tmpltHelper.getFilenameNoExt(${providerIdlFile.idlFile})}${tmpltHelper.serviceImplSuffix}.h
#end
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncludeCMakeLists.txt.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncludeCMakeLists.txt.vsl 2013-01-07 14:12:21 UTC (rev 376)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncludeCMakeLists.txt.vsl 2013-01-23 10:29:16 UTC (rev 377)
@@ -1,2 +1,4 @@
add_subdirectory(${rtcParam.name})
+MAP_ADD_STR(hdrs "${dol}{PROJECT_NAME}/" headers)
+set(headers ${dol}{headers} PARENT_SCOPE)
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/src/SrcCMakeLists.txt.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/src/SrcCMakeLists.txt.vsl 2013-01-07 14:12:21 UTC (rev 376)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/src/SrcCMakeLists.txt.vsl 2013-01-23 10:29:16 UTC (rev 377)
@@ -10,23 +10,25 @@
add_definitions(${dol}{OPENRTM_CFLAGS})
add_definitions(${dol}{OMNIORB_CFLAGS})
+MAP_ADD_STR(comp_hdrs "../" comp_headers)
+
link_directories(${dol}{OPENRTM_LIBRARY_DIRS})
link_directories(${dol}{OMNIORB_LIBRARY_DIRS})
-add_library(${dol}{PROJECT_NAME} ${dol}{LIB_TYPE} ${dol}{comp_srcs} ${dol}{ALL_IDL_SRCS})
-set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
+add_library(${dol}{PROJECT_NAME_LOWER} ${dol}{LIB_TYPE} ${dol}{comp_srcs} ${dol}{comp_headers} ${dol}{ALL_IDL_SRCS})
set_source_files_properties(${dol}{ALL_IDL_SRCS} PROPERTIES GENERATED 1)
-add_dependencies(${dol}{PROJECT_NAME} ALL_IDL_TGT)
-target_link_libraries(${dol}{PROJECT_NAME} ${dol}{OPENRTM_LIBRARIES})
+add_dependencies(${dol}{PROJECT_NAME_LOWER} ALL_IDL_TGT)
+target_link_libraries(${dol}{PROJECT_NAME_LOWER} ${dol}{OPENRTM_LIBRARIES})
-add_executable(${dol}{PROJECT_NAME}Comp ${dol}{standalone_srcs})
-target_link_libraries(${dol}{PROJECT_NAME}Comp ${dol}{PROJECT_NAME})
+add_executable(${dol}{PROJECT_NAME_LOWER}comp ${dol}{standalone_srcs})
+target_link_libraries(${dol}{PROJECT_NAME_LOWER}comp ${dol}{PROJECT_NAME_LOWER})
-install(TARGETS ${dol}{PROJECT_NAME} ${dol}{PROJECT_NAME}Comp
- EXPORT ${dol}{PROJECT_NAME}
+install(TARGETS ${dol}{PROJECT_NAME_LOWER} ${dol}{PROJECT_NAME_LOWER}comp
+ EXPORT ${dol}{PROJECT_NAME_LOWER}
RUNTIME DESTINATION ${dol}{BIN_INSTALL_DIR} COMPONENT component
LIBRARY DESTINATION ${dol}{LIB_INSTALL_DIR} COMPONENT component
ARCHIVE DESTINATION ${dol}{LIB_INSTALL_DIR} COMPONENT component)
-install(EXPORT ${dol}{PROJECT_NAME}
- DESTINATION ${dol}{LIB_INSTALL_DIR}/${dol}{PROJECT_NAME}
- FILE ${dol}{PROJECT_NAME}Depends.cmake)
+install(EXPORT ${dol}{PROJECT_NAME_LOWER}
+ DESTINATION ${dol}{LIB_INSTALL_DIR}/${dol}{PROJECT_NAME_LOWER}
+ FILE ${dol}{PROJECT_NAME_LOWER}Depends.cmake)
+
\ No newline at end of file
More information about the openrtm-commit
mailing list