Created
March 9, 2022 11:31
-
-
Save doevelopper/6c0a8af623a7bc6dec4daa1248912eee to your computer and use it in GitHub Desktop.
force linking against "Release" version of DDS libraries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```cmake | |
if (NOT RTIConnextDDS_FOUND) | |
find_package(RTIConnextDDS "6.1.0" EXACT REQUIRED COMPONENTS core) | |
# use always the release configuration of RTI libs regardless of current | |
# CMAKE_BUILD_TYPE (root cause of double free error) | |
set_target_properties(RTIConnextDDS::core PROPERTIES | |
MAP_IMPORTED_CONFIG_RELEASE Release | |
MAP_IMPORTED_CONFIG_DEBUG Release | |
MAP_IMPORTED_CONFIG_RELWITHDEBUGINFO Release) | |
set_target_properties(RTIConnextDDS::c_api PROPERTIES | |
MAP_IMPORTED_CONFIG_RELEASE Release | |
MAP_IMPORTED_CONFIG_DEBUG Release | |
MAP_IMPORTED_CONFIG_RELWITHDEBUGINFO Release) | |
set_target_properties(RTIConnextDDS::cpp_api PROPERTIES | |
MAP_IMPORTED_CONFIG_RELEASE Release | |
MAP_IMPORTED_CONFIG_DEBUG Release | |
MAP_IMPORTED_CONFIG_RELWITHDEBUGINFO Release) | |
set_target_properties(RTIConnextDDS::cpp2_api PROPERTIES | |
MAP_IMPORTED_CONFIG_RELEASE Release | |
MAP_IMPORTED_CONFIG_DEBUG Release | |
MAP_IMPORTED_CONFIG_RELWITHDEBUGINFO Release) | |
endif() | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment