Skip to content

Commit

Permalink
OneBranch Property File (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Mar 20, 2024
1 parent 5ba8431 commit 6c4c427
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .azure/onebranch.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<ItemDefinitionGroup>
<ClCompile>
<UseInternalMSUniCrtPackage>true</UseInternalMSUniCrtPackage>
</ClCompile>
</ItemDefinitionGroup>
</Project>
2 changes: 1 addition & 1 deletion .azure/pre-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ if ($_Arch -eq "x86") { $_Arch = "Win32" }
$Shared = "off"
if ($Link -ne "static") { $Shared = "on" }

Execute "cmake" "-G ""Visual Studio 17 2022"" -A $_Arch -DREACH_ARCH=$_Arch -DQUIC_TLS=$Tls -DQUIC_BUILD_SHARED=$Shared .."
Execute "cmake" "-G ""Visual Studio 17 2022"" -A $_Arch -DREACH_ARCH=$_Arch -DREACH_ONEBRANCH=on -DQUIC_TLS=$Tls -DQUIC_BUILD_SHARED=$Shared .."
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,17 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${REACH_OUTPUT_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${REACH_OUTPUT_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${REACH_OUTPUT_DIR})

option(REACH_ONEBRANCH "Builds for OneBranch" OFF)

if (WIN32)
# Statically link the OS included part of the runtime.
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")
if(REACH_ONEBRANCH)
message(STATUS "Configured for OneBranch builds")
configure_file(.azure/onebranch.props ${CMAKE_CURRENT_BINARY_DIR}/custom_props.props COPYONLY)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /p:ForceImportBeforeCppTargets=${CMAKE_BINARY_DIR}/custom_props.props")
endif()
endif()

# Configure and build msquic dependency.
Expand Down

0 comments on commit 6c4c427

Please sign in to comment.