Skip to content

Commit

Permalink
Update building scripts for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
afichet committed May 30, 2023
1 parent 2e8d4cc commit 8db5031
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ elseif (WIN32)

install(
FILES
"${ZLIB_ROOT}\\bin\\zlib.dll" # Zlib
"${ZLIB_ROOT}/bin/zlib.dll" # Zlib
$<TARGET_FILE:Imath::Imath> # OpenEXR
$<TARGET_FILE:OpenEXR::Iex>
$<TARGET_FILE:OpenEXR::IlmThread>
Expand Down
10 changes: 7 additions & 3 deletions build_dependencies.bat → build_dependencies.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$start_dir = $PWD

mkdir build
cd build

Expand Down Expand Up @@ -32,9 +34,11 @@ cd ../..
cd openexr
mkdir build
cd build
cmake .. ^
-DCMAKE_INSTALL_PREFIX="../../../lib"^
-DZLIB_ROOT="../../../lib"^
cmake .. `
-DCMAKE_INSTALL_PREFIX="../../../lib" `
-DZLIB_ROOT="../../../lib" `
-DImath_DIR="../../../lib/cmake/Imath"

cmake --build . --target install --config Release

cd $start_dir
14 changes: 0 additions & 14 deletions build_windows.bat

This file was deleted.

18 changes: 18 additions & 0 deletions build_windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
$dir = $PWD -replace '\\', '/'

cd build

cmake .. `
-DCMAKE_PREFIX_PATH="C:/Qt/6.5.1/msvc2019_64" `
-DZLIB_ROOT="$dir/build/depends/lib" `
-DImath_DIR="$dir/build/depends/lib/lib/cmake/Imath" `
-DOpenEXR_DIR="$dir/build/depends/lib/lib/cmake/OpenEXR" `
-DCMAKE_INSTALL_PREFIX="$dir/build/install" `
-DCMAKE_BUILD_TYPE="Release" `
-DCMAKE_CONFIGURATION_TYPES="Release"

cmake --build . --config Release

cpack

cd $dir

0 comments on commit 8db5031

Please sign in to comment.