Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake]: Fix usage after install when built with BUILD_SHARED_LIBS=ON #2016

Merged
Prev Previous commit
Next Next commit
Bump tcp_pubsub submodule to get TCP_PUBSUB_LIBRARY_TYPE
  • Loading branch information
DownerCase committed Feb 12, 2025
commit c6968de23a190eaa63e1ab6a72cc8f2d72b6bee1
7 changes: 1 addition & 6 deletions thirdparty/tcp_pubsub/build-tcp_pubsub.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
include_guard(GLOBAL)

# Build as static library
set(BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF)
set(TCP_PUBSUB_LIBRARY_TYPE STATIC)

add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/tcp_pubsub/tcp_pubsub thirdparty/tcp_pubsub EXCLUDE_FROM_ALL SYSTEM)

# Reset static / shared libs to old value
set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_OLD})
unset(BUILD_SHARED_LIBS_OLD)

set_property(TARGET tcp_pubsub PROPERTY FOLDER thirdparty/tcp_pubsub)
Loading