Skip to content

Commit

Permalink
Workaround Vcpkg, Add Missing BIGOBJ
Browse files Browse the repository at this point in the history
  • Loading branch information
iguessthislldo committed Apr 11, 2024
1 parent ba54951 commit cfefbeb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
17 changes: 12 additions & 5 deletions cmake/build_ace_tao.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
9 changes: 9 additions & 0 deletions cmake/configure_ace_tao.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion tools/dds/rtpsrelaylib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cfefbeb

Please sign in to comment.