Skip to content

Commit 0b185fb

Browse files
lsk567cmnrd
authored andcommitted
Revert "Merge pull request #81 from lf-lang/fix-ros2-cpp-build"
This reverts commit 1e520ff, reversing changes made to d568ddd.
1 parent 1e520ff commit 0b185fb

3 files changed

Lines changed: 16 additions & 25 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ endif()
99

1010
project(${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
2013
set(CMAKE_CXX_STANDARD 17)
2114
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -78,17 +71,3 @@ if (DEFINED LF_REACTOR_CPP_SUFFIX)
7871
else()
7972
install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
8073
endif()
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()

lib/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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)
6972
endif()

package.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,17 @@
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>

0 commit comments

Comments
 (0)