@@ -40,6 +40,9 @@ call :build_and_test Release "-DOPENSSL_NO_ASM=1" || goto error
4040@ rem tests or copy them around so Windows can find it in the same directory. Instead just put the dll's location onto the path
4141set PATH = %BUILD_DIR% ;%BUILD_DIR% \crypto;%BUILD_DIR% \ssl;%PATH%
4242call :build_and_test Release " -DBUILD_SHARED_LIBS=1" || goto error
43+ @ rem Reuse the build tree from the preceding shared build to verify that
44+ @ rem `cmake --install` places DLLs in bin/ and import libraries in lib/.
45+ call :verify_install || goto error
4346call :build_and_test Release " -DBUILD_SHARED_LIBS=1 -DFIPS=1" || goto error
4447if /i not " %ARCH_OPTION% " == " arm64" (
4548 @ rem For FIPS on Windows/x86-64 we also have a RelWithDebInfo build to generate debug symbols.
@@ -110,3 +113,37 @@ exit /b %errorlevel%
110113:error
111114echo Failed with error #%errorlevel% .
112115exit /b 1
116+
117+ @ rem Runs `cmake --install` against the already-configured %BUILD_DIR% and
118+ @ rem verifies that the expected shared-library artifacts land in the
119+ @ rem conventional Windows install layout: DLLs in bin/, import libs in lib/.
120+ @ rem Assumes the caller has already done a BUILD_SHARED_LIBS=1 build.
121+ :verify_install
122+ @ echo on
123+ set INSTALL_DIR = %TEMP% \awslc_install
124+ rmdir /s /q " %INSTALL_DIR% " 2 > nul
125+
126+ @ echo LOG: %date% -%time% running cmake install into %INSTALL_DIR%
127+ cmake --install " %BUILD_DIR% " --prefix " %INSTALL_DIR% " || goto error
128+
129+ @ echo LOG: %date% -%time% verifying install layout
130+ dir " %INSTALL_DIR% \bin\"
131+ dir " %INSTALL_DIR% \lib\"
132+ if not exist " %INSTALL_DIR% \bin\crypto.dll" (
133+ echo ERROR: crypto.dll not found in %INSTALL_DIR% \bin\
134+ goto error
135+ )
136+ if not exist " %INSTALL_DIR% \bin\ssl.dll" (
137+ echo ERROR: ssl.dll not found in %INSTALL_DIR% \bin\
138+ goto error
139+ )
140+ if not exist " %INSTALL_DIR% \lib\crypto.lib" (
141+ echo ERROR: crypto.lib not found in %INSTALL_DIR% \lib\
142+ goto error
143+ )
144+ if not exist " %INSTALL_DIR% \lib\ssl.lib" (
145+ echo ERROR: ssl.lib not found in %INSTALL_DIR% \lib\
146+ goto error
147+ )
148+ @ echo LOG: %date% -%time% install verification passed
149+ exit /b 0
0 commit comments