diff --git a/autobuild.xml b/autobuild.xml index 5c42aff..201b9e3 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -12,7 +12,7 @@ license OpenEXR license_file - LICENSES/openexr.txt + LICENSES/OpenEXR.txt name openexr platforms @@ -40,6 +40,7 @@ manifest + LICENSES/OpenEXR.txt include lib diff --git a/build-cmd.sh b/build-cmd.sh old mode 100644 new mode 100755 index a3937b7..f7c5b52 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -21,39 +21,34 @@ fi top="$(pwd)" stage="$(pwd)/stage" +srcdir="$top/openexr" +builddir="$top/build" -echo $top -echo $stage - -# load autobuild provided shell functions and variables -source_environment_tempfile="$stage/source_environment.sh" -"$autobuild" source_environment > "$source_environment_tempfile" -. "$source_environment_tempfile" +mkdir -p "$stage/include" "$stage/lib/release" "$builddir" # remove_cxxstd source "$(dirname "$AUTOBUILD_VARIABLES_FILE")/functions" build=${AUTOBUILD_BUILD_ID:=0} +version=$(cat VERSION.txt) +echo "${version}.${build}" > "${stage}/VERSION.txt" -mkdir -p "$stage/lib/release" - -srcdir="$top/openexr" -builddir="$top/build" - -mkdir -p $builddir -mkdir -p $stage +# load autobuild provided shell functions and variables +source_environment_tempfile="$stage/source_environment.sh" +"$autobuild" source_environment > "$source_environment_tempfile" +. "$source_environment_tempfile" pushd $builddir case "$AUTOBUILD_PLATFORM" in windows*) - cmake $(cygpath -w "$srcdir") -DCMAKE_INSTALL_PREFIX=$(cygpath -w "$top/release") + cmake ../openexr -DCMAKE_INSTALL_PREFIX=../release cmake --build . --target install --config Release -j cp -v ../release/lib/*.lib "$stage/lib/release/" - cp -v ../release/bin/*.dll "$stage/lib/release/" + cp -rv ../release/bin/*.dll "$stage/lib/release/" ;; darwin*) - cmake $srcdir --install-prefix "$top/release" -DOPENEXR_FORCE_INTERNAL_IMATH:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" + cmake ../openexr --install-prefix "$top/release" -DOPENEXR_FORCE_INTERNAL_IMATH:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" cmake --build . --target install --config Release -j cp -v "$top"/release/lib/*.a "$stage/lib/release/" @@ -63,19 +58,18 @@ darwin*) echo "checking built architectures in libOpenEXR-3_2.a: '$built_archs'. expected 'x86_64 arm64'" test 'x86_64 arm64' = "$built_archs" ;; -linux64*) - cmake $srcdir --install-prefix "$top/release" -DOPENEXR_FORCE_INTERNAL_IMATH:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF - cmake --build . --target install --config Release -j - - cp -v "$top"/release/lib/*.a "$stage/lib/release/" +linux64) + cmake "../openexr" --install-prefix "$top/release" -DOPENEXR_LIB_SUFFIX= -DBUILD_SHARED_LIBS=OFF + cmake --build . -j$(nproc) --target install --config Release + cp -a $top/release/lib/{libIex.a,libIlmThread.a,libOpenEXR.a,libOpenEXRCore.a,libOpenEXRUtil.a} "$stage/lib/release/" ;; + esac -cp -rv "$top/release/include" "$stage" +cp -rv ../release/include/OpenEXR "$stage/include/OpenEXR" +cp -rv ../release/include/Imath "$stage/include/Imath" popd mkdir -p "$stage/LICENSES" -cp "$top/LICENSE" "$stage/LICENSES/openexr.txt" -cp -v $top/VERSION.txt $stage/VERSION.txt - +cp "LICENSE" "$stage/LICENSES/OpenEXR.txt"