Skip to content

Commit

Permalink
Fix robocomp and move Qt cmake library to qt.cmake robocomp
Browse files Browse the repository at this point in the history
  • Loading branch information
alfiTH committed Jun 24, 2024
1 parent 539c6ad commit d03888c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ SET ( SOURCES
${statemachine_visual_sources}
)


${cpp11_ice_packages}

${agm_includes}
Expand All @@ -44,25 +43,6 @@ ${wrap_ui}
# no-char8_t to avoid a problem with ICE Connection lib.
add_definitions(-fmax-errors=1 -fno-char8_t)

find_package(Qt6 COMPONENTS Core Widgets StateMachine REQUIRED)
SET (QT_LIBRARIES
$${QT_LIBRARIES}
Qt6::Core
Qt6::Widgets
Qt6::StateMachine )

add_definitions(-I/usr/include/x86_64-linux-gnu/qt6/QtOpenGLWidgets/)

if( USE_QT6)
LIST(APPEND SOURCES $$ENV{ROBOCOMP}/classes/abstract_graphic_viewer/abstract_graphic_viewer.cpp)
LIST(APPEND HEADERS $$ENV{ROBOCOMP}/classes/abstract_graphic_viewer/abstract_graphic_viewer.h)
LIST(APPEND LIBS QGLViewer-qt6 Qt6OpenGLWidgets)
else()
list(APPEND SOURCES $$ENV{ROBOCOMP}/classes/abstract_graphic_viewer_qt5/abstract_graphic_viewer.cpp)
list(APPEND HEADERS $$ENV{ROBOCOMP}/classes/abstract_graphic_viewer_qt5/abstract_graphic_viewer.h)
LIST(APPEND LIBS QGLViewer-qt5)
endif()

# Specify construction and link process
ADD_EXECUTABLE( ${component_name} $${SOURCES} $${MOC_SOURCES} $${RC_SOURCES} $${UI_HEADERS} )
TARGET_LINK_LIBRARIES( ${component_name} $${LIBS} $${STATIC_LIBS} $${SPECIFIC_LIBS} $${QT_LIBRARIES} $${Ice_LIBRARIES} )
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
${dsr_find_eigen}
# Sources set
SET ( SOURCES
LIST(APPEND SOURCES
specificworker.cpp
specificmonitor.cpp
)

# Headers set
SET ( HEADERS
LIST(APPEND HEADERS
specificworker.h
specificmonitor.h
)


${dsr_definitions}
SET (LIBS $${LIBS} ${dsr_libs})
LIST(APPEND LIBS $${LIBS} ${dsr_libs})


Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def wrap_ice(self):
interface_names = []

if self.component.recursiveImports is not None and self.component.ice_interfaces_names is not None:
for im in sorted(self.component.recursiveImports + self.component.ice_interfaces_names):<<<<<<< development
for im in sorted(self.component.recursiveImports + self.component.ice_interfaces_names):
name = im.split('/')[-1].split('.')[0]
interface_names.append(name)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def methods(self, interfaces, subscribe=False):
if v[1] != 'ret':
return_str += " " + v[1] + " = " + self.replace_type_cpp_to_python(v[0]) + "()\n"
vector_str = ", ".join([v[1] for v in out_values])
return_str = f" return [{vector_str}]"
return_str = f"return [{vector_str}]"
if subscribe:
method_str1 = "SUBSCRIPTION to"
else:
Expand Down

0 comments on commit d03888c

Please sign in to comment.