diff --git a/cmake/build_ace_tao.cmake b/cmake/build_ace_tao.cmake index eb2bcedc8e3..c2f36750ea1 100644 --- a/cmake/build_ace_tao.cmake +++ b/cmake/build_ace_tao.cmake @@ -16,6 +16,18 @@ if(OPENDDS_JUST_BUILD_HOST_TOOLS) list(APPEND _OPENDDS_CONFIGURE_ACE_TAO_ARGS "--workspace-file=${ws}") endif() +set(_build_cmd "${CMAKE_COMMAND}" -E env "ACE_ROOT=${OPENDDS_ACE}" "TAO_ROOT=${OPENDDS_TAO}") +if(_OPENDDS_XERCES3_FOR_ACE) + list(APPEND _build_cmd "XERCESCROOT=${_OPENDDS_XERCES3_FOR_ACE}") + + # Vcpkg debug libraries are in a non-standard place + set(_opendds_debug_vcpkg_xerces3_for_ace "${_OPENDDS_XERCES3_FOR_ACE}/debug/lib") + if(MSVC AND IS_DIRECTORY "${_opendds_debug_vcpkg_xerces3_for_ace}") + list(APPEND _OPENDDS_CONFIGURE_ACE_TAO_ARGS + --env "XERCESC_LIBDIR=${_opendds_debug_vcpkg_xerces3_for_ace}") + endif() +endif() + find_package(Perl REQUIRED) if(OPENDDS_STATIC) list(APPEND _OPENDDS_CONFIGURE_ACE_TAO_ARGS --static=1) @@ -35,11 +47,6 @@ execute_process( COMMAND_ERROR_IS_FATAL ANY ) -set(_build_cmd "${CMAKE_COMMAND}" -E env "ACE_ROOT=${OPENDDS_ACE}" "TAO_ROOT=${OPENDDS_TAO}") -if(_OPENDDS_XERCES3_FOR_ACE) - list(APPEND _build_cmd "XERCESCROOT=${_OPENDDS_XERCES3_FOR_ACE}") -endif() - if(_OPENDDS_MPC_TYPE STREQUAL gnuace) execute_process( COMMAND diff --git a/cmake/configure_ace_tao.pl b/cmake/configure_ace_tao.pl index 0add2d4e216..773f7508408 100755 --- a/cmake/configure_ace_tao.pl +++ b/cmake/configure_ace_tao.pl @@ -33,6 +33,8 @@ push(@opts, "$key=s"); } push(@opts, "macro-line=s@"); +my %env; +push(@opts, "env=s%" => %env); if (!GetOptions(\%values, @opts)) { exit(1); } @@ -113,6 +115,13 @@ sub read_file { $ENV{MPC_ROOT} = File::Spec->rel2abs($values{mpc}); $ENV{ACE_ROOT} = File::Spec->rel2abs($values{ace}); $ENV{TAO_ROOT} = File::Spec->rel2abs($values{tao}); +if ($values{'env'}) { + for my $name (keys(%{$values{'env'}})) { + my $value = $values{env}->{$name}; + print("env: $name=$value\n"); + $ENV{$name} = $value; + } +} my $mwc_name = 'ACE_TAO_for_OpenDDS.mwc'; my $mwc_src = $values{'workspace-file'} // "$FindBin::RealBin/../$mwc_name"; my $mwc = "$values{src}/$mwc_name"; diff --git a/tools/dds/rtpsrelaylib/CMakeLists.txt b/tools/dds/rtpsrelaylib/CMakeLists.txt index 9f3a1925bf6..2561ccc9c79 100644 --- a/tools/dds/rtpsrelaylib/CMakeLists.txt +++ b/tools/dds/rtpsrelaylib/CMakeLists.txt @@ -18,7 +18,7 @@ target_sources(OpenDDS_RtpsRelayLib Utility.h export.h ) -_opendds_library(OpenDDS_RtpsRelayLib) +_opendds_library(OpenDDS_RtpsRelayLib MSVC_BIGOBJ) target_link_libraries(OpenDDS_RtpsRelayLib PUBLIC ${deps}) opendds_target_sources(OpenDDS_RtpsRelayLib