File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010project (${LIB_TARGET} LANGUAGES CXX VERSION 0.0.1)
1111
12- if (NOT DEFINED LF_REACTOR_CPP_SUFFIX)
13- find_package (ament_cmake QUIET )
14- if (ament_cmake_FOUND)
15- set (REACTOR_CPP_USE_AMENT ON )
16- endif ()
17- endif ()
18-
1912# require C++17
2013set (CMAKE_CXX_STANDARD 17)
2114set (CMAKE_CXX_STANDARD_REQUIRED ON )
@@ -78,17 +71,3 @@ if (DEFINED LF_REACTOR_CPP_SUFFIX)
7871else ()
7972 install (DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} " )
8073endif ()
81-
82- if (REACTOR_CPP_USE_AMENT)
83- # Install the export file - must be in root CMakeLists.txt for ament compatibility
84- install (EXPORT ${LIB_TARGET} DESTINATION share/${LIB_TARGET} /cmake NAMESPACE ${LIB_TARGET} ::)
85- ament_export_targets (${LIB_TARGET} HAS_LIBRARY_TARGET )
86- ament_export_include_directories (include )
87- ament_export_libraries (${LIB_TARGET} )
88- ament_package ()
89- else ()
90- # For non-ament builds, install export file from here
91- if (REACTOR_CPP_INSTALL)
92- install (EXPORT ${LIB_TARGET} DESTINATION share/${LIB_TARGET} /cmake)
93- endif ()
94- endif ()
Original file line number Diff line number Diff line change @@ -61,9 +61,12 @@ if(REACTOR_CPP_INSTALL)
6161 install (FILES "${PROJECT_BINARY_DIR} /include/reactor-cpp/config.hh" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} /reactor-cpp" )
6262 endif ()
6363
64- install (TARGETS ${LIB_TARGET} EXPORT ${LIB_TARGET}
64+ install (TARGETS ${LIB_TARGET} EXPORT ${LIB_TARGET} Config
6565 ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR} " OPTIONAL
6666 LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR} " OPTIONAL
6767 RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR} " OPTIONAL )
68- # Note: install(EXPORT ...) moved to root CMakeLists.txt for ament compatibility
68+
69+ install (EXPORT ${LIB_TARGET} Config DESTINATION share/${LIB_TARGET} /cmake)
70+
71+ export (TARGETS ${PROJECT_NAME} FILE ${LIB_TARGET} Config.cmake )
6972endif ()
Original file line number Diff line number Diff line change 66 <description >A C++ reactor runtime</description >
77 <maintainer email =" christian.menard@tu-dresden.de" >user</maintainer >
88 <license >ISC License</license >
9- <buildtool_depend >ament_cmake</buildtool_depend >
109 <export >
11- <build_type >ament_cmake</build_type >
10+ <build_type >cmake</build_type >
11+ </export >
12+ </package >
13+ <package format =" 3" >
14+ <name >reactor-cpp-foo</name >
15+ <version >0.0.0</version >
16+ <description >A C++ reactor runtime</description >
17+ <maintainer email =" christian.menard@tu-dresden.de" >user</maintainer >
18+ <license >ISC License</license >
19+ <export >
20+ <build_type >cmake</build_type >
1221 </export >
1322</package >
You can’t perform that action at this time.
0 commit comments