Skip to content

Commit

Permalink
Merge pull request #833 from iillyyaa/do-not-export-executable-targets
Browse files Browse the repository at this point in the history
Do not EXPORT executable targets
  • Loading branch information
RainerKuemmerle authored Aug 31, 2024
2 parents 48129bd + 092bbee commit 11440dc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion g2o/apps/g2o_cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ target_link_libraries(g2o_cli_application g2o_cli_library)

set_target_properties(g2o_cli_application PROPERTIES OUTPUT_NAME g2o)

install(TARGETS g2o_cli_library g2o_cli_application
install(TARGETS g2o_cli_library
EXPORT ${G2O_TARGETS_EXPORT_NAME}
RUNTIME DESTINATION ${RUNTIME_DESTINATION}
LIBRARY DESTINATION ${LIBRARY_DESTINATION}
ARCHIVE DESTINATION ${ARCHIVE_DESTINATION}
INCLUDES DESTINATION ${INCLUDES_DESTINATION}
)
install(TARGETS g2o_cli_application
RUNTIME DESTINATION ${RUNTIME_DESTINATION}
)

file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp")

Expand Down
5 changes: 4 additions & 1 deletion g2o/apps/g2o_simulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ add_executable(g2o_simulator3d_application
target_link_libraries(g2o_simulator3d_application g2o_simulator_library types_slam3d_addons types_slam3d types_slam2d_addons types_slam2d core)
set_target_properties(g2o_simulator3d_application PROPERTIES OUTPUT_NAME g2o_simulator3d)

install(TARGETS g2o_simulator_library g2o_simulator2d_application g2o_simulator3d_application
install(TARGETS g2o_simulator_library
EXPORT ${G2O_TARGETS_EXPORT_NAME}
RUNTIME DESTINATION ${RUNTIME_DESTINATION}
LIBRARY DESTINATION ${LIBRARY_DESTINATION}
ARCHIVE DESTINATION ${ARCHIVE_DESTINATION}
INCLUDES DESTINATION ${INCLUDES_DESTINATION}
)
install(TARGETS g2o_simulator2d_application g2o_simulator3d_application
RUNTIME DESTINATION ${RUNTIME_DESTINATION}
)

file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp")
install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/apps/g2o_simulator)
5 changes: 4 additions & 1 deletion g2o/apps/g2o_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ target_link_libraries(viewer_library core g2o_cli_library ${QGLVIEWER_LIBRARY} $
target_link_libraries(viewer_library core opengl_helper)
target_link_libraries(g2o_viewer viewer_library)

install(TARGETS g2o_viewer viewer_library
install(TARGETS viewer_library
EXPORT ${G2O_TARGETS_EXPORT_NAME}
RUNTIME DESTINATION ${RUNTIME_DESTINATION}
LIBRARY DESTINATION ${LIBRARY_DESTINATION}
ARCHIVE DESTINATION ${ARCHIVE_DESTINATION}
INCLUDES DESTINATION ${INCLUDES_DESTINATION} ${qt5_includes_dirs} ${QGLVIEWER_INCLUDE_DIR}
)
install(TARGETS g2o_viewer
RUNTIME DESTINATION ${RUNTIME_DESTINATION}
)

file(GLOB headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp")
install(FILES ${headers} DESTINATION ${INCLUDES_INSTALL_DIR}/apps/g2o_viewer)
Expand Down

0 comments on commit 11440dc

Please sign in to comment.