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

[11561] Upgrade installer to support cmake linking statically or dynamically to Fast-DDS #1958

Merged
merged 4 commits into from
May 18, 2021

Conversation

MiguelBarro
Copy link
Contributor

@MiguelBarro MiguelBarro commented May 13, 2021

Now using cmake -DFASTDDS_STATIC=ON ... is possible to link statically to a Fast-DDS installation (formerly only dynamic linking was available).
Merge after eProsima/Fast-CDR#107

@MiguelBarro MiguelBarro changed the title Upgrade installer to support cmake linking statically or dynamically to Fast-DDS [11561 Upgrade installer to support cmake linking statically or dynamically to Fast-DDS May 14, 2021
@MiguelBarro MiguelBarro changed the title [11561 Upgrade installer to support cmake linking statically or dynamically to Fast-DDS [11561] Upgrade installer to support cmake linking statically or dynamically to Fast-DDS May 14, 2021
endif()
elseif(MSVC_VERSION GREATER_EQUAL 1920)
if(MSVC_VERSION LESS_EQUAL 1900)
message(FATAL_ERROR "Not supported version of Visual Studio")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message(FATAL_ERROR "Not supported version of Visual Studio")
message(FATAL_ERROR "Not supported version ${MSVC_VERSION} of Visual Studio")

find_package(OpenSSL REQUIRED)
include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-static-targets.cmake)
else()
include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-dynamic-targets.cmake)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if fails, try with the static config file

@MiguelBarro MiguelBarro requested a review from richiware May 17, 2021 14:04
@MiguelBarro MiguelBarro force-pushed the feature/installer_cmake_static branch from ae2040e to ee09b6c Compare May 17, 2021 14:10
include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake)
if(FASTDDS_STATIC)
# OpenSSL static libraries are not distributed with the installer
find_package(OpenSSL REQUIRED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this only should be added if compiled with openssl.

@MiguelCompany MiguelCompany merged commit f7f5526 into master May 18, 2021
@MiguelCompany MiguelCompany deleted the feature/installer_cmake_static branch May 18, 2021 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants