Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #18 from ericmehl/msvc2017
Browse files Browse the repository at this point in the history
Updater to GafferHQ 4.0.0 dependencies
  • Loading branch information
ericmehl authored Jan 3, 2022
2 parents 5ec7c02 + fd0cb9b commit 5f2eee1
Show file tree
Hide file tree
Showing 64 changed files with 5,490 additions and 143 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
working
*/archives
**/gafferBuild
llvm*/build-release
qt*/**/*.qm
c-blosc*/**
qt-adsk-*/**
51 changes: 44 additions & 7 deletions Alembic/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,56 @@

"manifest" : [

"bin/abcconvert",
"bin/abcecho",
"bin/abcechobounds",
"bin/abcls",
"bin/abcstitcher",
"bin/abctree",
"bin/abcconvert{executableExtension}",
"bin/abcecho{executableExtension}",
"bin/abcechobounds{executableExtension}",
"bin/abcls{executableExtension}",
"bin/abcstitcher{executableExtension}",
"bin/abctree{executableExtension}",

"include/Alembic",

"lib/libAlembic*",
"lib/{libraryPrefix}Alembic*",
"lib/{libraryPrefix}Alembic*.lib",

"python/alembic*",

],

"platform:windows" : {

"commands" : [

"cmake"
" -G {cmakeGenerator}"
" -D CMAKE_BUILD_TYPE={cmakeBuildType}"
" -D CMAKE_INSTALL_PREFIX={buildDir}"
" -D CMAKE_PREFIX_PATH={buildDir}"
" -D ALEMBIC_NO_TESTS=ON"
" -D ALEMBIC_NO_OPENGL=ON"
" -D Boost_NO_SYSTEM_PATHS=ON"
" -D Boost_NO_BOOST_CMAKE=ON"
" -D BOOST_ROOT={buildDir}"
" -D HDF5_ROOT={buildDir}"
" -D ILMBASE_ROOT={buildDir}"
" -D USE_TESTS=OFF"
" -D USE_HDF5=ON"
" -D USE_PYILMBASE=OFF"
" -D USE_PYALEMBIC=OFF"
" -D USE_ARNOLD=OFF"
" -D USE_PRMAN=OFF"
" -D USE_MAYA=OFF"
" -D ALEMBIC_LIB_USES_BOOST=TRUE"
" -D ALEMBIC_ILMBASE_HALF_LIB={buildDir}\\lib\\half.lib"
" -D ALEMBIC_ILMBASE_IEX_LIB={buildDir}\\lib\\Iex.lib"
" -D ALEMBIC_ILMBASE_IEXMATH_LIB={buildDir}\\lib\\IexMath.lib"
" -D ALEMBIC_ILMBASE_ILMTHREAD_LIB={buildDir}\\lib\\IlmThread.lib"
" -D ALEMBIC_ILMBASE_IMATH_LIB={buildDir}\\lib\\Imath.lib"
" .",
"cmake --build . --config {cmakeBuildType} --target install"

],

},

}
76 changes: 74 additions & 2 deletions Appleseed/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"downloads" : [

"https://github.com/appleseedhq/appleseed/archive/2.1.0-beta.tar.gz"
"https://github.com/appleseedhq/appleseed/archive/2.0.5-beta.tar.gz"

],

Expand Down Expand Up @@ -54,8 +54,10 @@
" -D CMAKE_PREFIX_PATH={buildDir}"
" -D CMAKE_INSTALL_PREFIX={buildDir}/appleseed"
" -D CMAKE_LIBRARY_PATH={pythonLibDir}"
" -D BOOST_ROOT={buildDir}"
" -D Boost_NO_SYSTEM_PATHS=ON"
" ..",

"cd build && make install -j {jobs} VERBOSE=1"

],
Expand Down Expand Up @@ -103,5 +105,75 @@
"appleseed/shaders",

],
"platform:windows" : {

"enabled" : False,

"variables" : {
"cmakeGenerator" : "\"Visual Studio 15 2017 Win64\"",
},

"environment" : {

"PATH" : "%PATH%;{buildDir}\\lib;{buildDir}\\bin",

},

"commands" : [
"if not exist \"build\" mkdir build",
"cd build &&"
" cmake"
" -G {cmakeGenerator}"
" -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON"
" -D CMAKE_BUILD_TYPE={cmakeBuildType}"
" -D PYTHON_LIBRARY={pythonLibDir}\\python{pythonMajorVersion}{pythonMinorVersion}.lib"
" -D PYTHON_INCLUDE_DIR={pythonIncludeDir}"
" -D WITH_OSL=ON"
" -D WITH_CLI=ON"
" -D WITH_STUDIO=OFF"
" -D WITH_TOOLS=OFF"
" -D WITH_PYTHON=ON"
" -D WITH_PYTHON2_BINDINGS=OFF"
" -D WITH_PYTHON3_BINDINGS=ON"
" -D PYTHON3_INCLUDE_DIR={pythonIncludeDir}"
" -D PYTHON_MAJOR_VERSION={pythonMajorVersion}"
" -D PYTHON_MINOR_VERSION={pythonMinorVersion}"
" -D Boost_PYTHON3_LIBRARY={buildDir}/lib/boost_python{pythonMajorVersion}{pythonMinorVersion}{sharedLibraryExtension}"
" -D WITH_OSL=ON"
" -D WITH_TESTS=OFF"
" -D USE_STATIC_BOOST=OFF"
" -D USE_STATIC_OIIO=OFF"
" -D USE_STATIC_EXR=OFF"
" -D USE_STATIC_OSL=OFF"
" -D USE_EXTERNAL_ZLIB=ON"
" -D USE_EXTERNAL_EXR=ON"
" -D USE_EXTERNAL_PNG=ON"
" -D USE_EXTERNAL_XERCES=ON"
" -D USE_EXTERNAL_OSL=ON"
" -D USE_EXTERNAL_OIIO=ON"
" -D USE_EXTERNAL_ALEMBIC=ON"
" -D WARNINGS_AS_ERRORS=OFF"
" -D USE_SSE=ON"
" -D CMAKE_PREFIX_PATH={buildDir}"
" -D CMAKE_INSTALL_PREFIX={buildDir}\\appleseed"
" -D BOOST_ROOT={buildDir}"
" -D IMATH_INCLUDE_DIRS={buildDir}\\include"
" -D IMATH_HALF_LIBRARY={buildDir}\\lib\\Half.lib"
" -D IMATH_IEX_LIBRARY={buildDir}\\lib\\Iex.lib"
" -D IMATH_MATH_LIBRARY={buildDir}\\lib\\Imath.lib"
" -D OPENEXR_INCLUDE_DIRS={buildDir}\\include"
" -D OPENEXR_IMF_LIBRARY={buildDir}\\lib\\IlmImf.lib"
" -D OPENEXR_THREADS_LIBRARY={buildDir}\\lib\\IlmThread.lib"
" -D XERCES_LIBRARY={buildDir}\\lib\\xerces-c_3.lib"
" -D OSL_INCLUDE_DIR={buildDir}\\include"
" -D LLVM_LIBS_DIR={buildDir}\\lib"
" OSL_EXEC_LIBRARY={buildDir}\\lib\\oslexec.lib"
" OSL_COMP_LIBRARY={buildDir}\\lib\\oslcomp.lib"
" OSL_QUERY_LIBRARY={buildDir}\\lib\\oslquery.lib"
" ..",
"cd build && cmake --build . --config {cmakeBuildType} --target install",
]

}

}
10 changes: 10 additions & 0 deletions Appleseed/patches/windows/0001-remove_boost_namespace.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/src/appleseed/renderer/meta/tests/test_tracer.cpp 2020-05-14 18:34:13.413540600 -0400
+++ b/src/appleseed/renderer/meta/tests/test_tracer.cpp 2020-05-14 18:32:10.040808300 -0400
@@ -83,7 +83,6 @@

using namespace foundation;
using namespace renderer;
-using namespace boost;
using namespace std;

TEST_SUITE(Renderer_Kernel_Lighting_Tracer)
17 changes: 17 additions & 0 deletions Appleseed/patches/windows/0002-win-vs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- a/cmake/config/win-vs.txt 2020-05-14 19:22:32.135735200 -0400
+++ b/cmake/config/win-vs.txt 2020-05-14 19:24:49.460860100 -0400
@@ -312,10 +312,10 @@

macro (link_against_osl target)
set (LLVM_LIBS
- LLVMLTO LLVMLinker LLVMipo LLVMVectorize LLVMBitWriter LLVMTableGen LLVMDebugInfo LLVMOption LLVMX86Disassembler LLVMX86AsmParser
+ LLVMLTO LLVMLinker LLVMipo LLVMVectorize LLVMBitWriter LLVMTableGen LLVMOption LLVMX86Disassembler LLVMX86AsmParser
- LLVMX86CodeGen LLVMSelectionDAG LLVMAsmPrinter LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter LLVMX86Utils LLVMIRReader LLVMBitReader
+ LLVMX86CodeGen LLVMSelectionDAG LLVMAsmPrinter LLVMX86Desc LLVMX86Info LLVMX86Utils LLVMIRReader LLVMBitReader
- LLVMAsmParser LLVMMCDisassembler LLVMMCParser LLVMInstrumentation LLVMInterpreter LLVMMCJIT LLVMJIT LLVMCodeGen LLVMObjCARCOpts
- LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMRuntimeDyld LLVMExecutionEngine LLVMTarget LLVMMC
+ LLVMAsmParser LLVMMCDisassembler LLVMMCParser LLVMInstrumentation LLVMInterpreter LLVMMCJIT LLVMCodeGen LLVMObjCARCOpts
+ LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMAnalysis LLVMRuntimeDyld LLVMExecutionEngine LLVMTarget LLVMMC
LLVMObject LLVMCore LLVMSupport
)

11 changes: 11 additions & 0 deletions Appleseed/patches/windows/unique_ptr_1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- ./src/appleseed/foundation/image/genericimagefilewriter.cpp
+++ ./src/appleseed/foundation/image/genericimagefilewriter.cpp
@@ -79,7 +79,7 @@
{
// Destroy the ImageOutput stucture.
if (m_writer != nullptr)
- OIIO::ImageOutput::destroy(m_writer);
+ OIIO::ImageOutput::destroy(m_writer.release());

delete impl;
}
11 changes: 11 additions & 0 deletions Appleseed/patches/windows/unique_ptr_2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- ./src/appleseed/foundation/image/genericimagefilewriter.h
+++ ./src/appleseed/foundation/image/genericimagefilewriter.h
@@ -92,7 +92,7 @@
struct Impl;
Impl* impl;

- OIIO::ImageOutput* m_writer;
+ std::unique_ptr<OIIO::ImageOutput> m_writer;
const char* m_filename;
};

22 changes: 22 additions & 0 deletions Appleseed/patches/windows/unique_ptr_3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- ./src/appleseed/foundation/image/genericprogressiveimagefilereader.cpp
+++ ./src/appleseed/foundation/image/genericprogressiveimagefilereader.cpp
@@ -65,7 +65,7 @@
{
Logger* m_logger;
string m_filename;
- OIIO::ImageInput* m_input;
+ std::unique_ptr<OIIO::ImageInput> m_input;
bool m_supports_random_access;
bool m_is_tiled;
CanvasProperties m_props;
@@ -177,9 +177,7 @@
// but OpenImageIO 1.5.20 (the version included in appleseed-deps at the time
// of writing) is too old to have this method. Since on Windows we link to
// OpenImageIO statically, this should be safe anyway.
- delete impl->m_input;
-
- impl->m_input = nullptr;
+ OIIO::ImageInput::destroy(impl->m_input.release());
}

bool GenericProgressiveImageFileReader::is_open() const
10 changes: 10 additions & 0 deletions BitstreamVera/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,15 @@
"fonts",

],
"platform:windows" : {

"commands" : [

"if not exist \"{buildDir}\\fonts\" mkdir {buildDir}\\fonts",
"copy *.ttf {buildDir}\\fonts"

]

}

}
24 changes: 23 additions & 1 deletion Blosc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,30 @@
"manifest" : [

"include/blosc*.h",
"lib/libblosc*{sharedLibraryExtension}*",
"lib/{libraryPrefix}blosc*{sharedLibraryExtension}*",
"lib/{libraryPrefix}blosc*.lib",

],
"platform:windows" : {

"commands" : [

"mkdir gafferBuild",
"cd gafferBuild && "
" cmake"
" -Wno-dev"
" -G {cmakeGenerator}"
" -D CMAKE_BUILD_TYPE={cmakeBuildType}"
" -D CMAKE_INSTALL_PREFIX={buildDir}"
" -D BUILD_TESTS=OFF"
" -D BUILD_BENCHMARKS=OFF"
" -D BUILD_STATIC=OFF"
" ..",

"cd gafferBuild && cmake --build . --config {cmakeBuildType} --target install -- -j {jobs}",

],

},

}
47 changes: 43 additions & 4 deletions Boost/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@

"dependencies" : [ "Python" ],

"variables" : {

"boostVersionSuffix" : "",

},

"environment" : {

# Without this, boost build will still pick up the system python framework,
Expand All @@ -28,16 +34,49 @@
"commands" : [

"./bootstrap.sh --prefix={buildDir} --with-python={buildDir}/bin/python --with-python-root={buildDir} --without-libraries=log --without-icu",
"./bjam -d+2 -j {jobs} --disable-icu cxxflags='-std=c++{c++Standard}' variant=release link=shared threading=multi install",
"./bjam -d+2 -j {jobs} --disable-icu cxxflags='-std=c++{c++Standard}' cxxstd={c++Standard} variant=release link=shared threading=multi install",

],

"manifest" : [

"include/boost",
"lib/libboost_*{sharedLibraryExtension}*",
"lib/libboost_test_exec_monitor.a",
"include/boost{boostVersionSuffix}",
"lib/{libraryPrefix}boost_*{sharedLibraryExtension}*",
"lib/{libraryPrefix}boost_*.lib",
"lib/libboost_test_exec_monitor*{staticLibraryExtension}", # Windows and Linux both use the "lib" prefix

],

"platform:windows" : {

"dependencies" : [ "Python", "Zlib" ],

"variables" : {

"boostVersionSuffix" : "-1_68",

},

"publicVariables" : {

"boostLibSuffix" : "-vc141-mt-x64{boostVersionSuffix}",

},

"environment" : {

# Boost needs help finding Python
"PATH" : "%PATH%;{buildDir}\\bin",
"PYTHONPATH" : "{buildDir};{buildDir}\\bin;{buildDir}\\lib\\python{pythonVersion};{buildDir}\\lib"

},

"commands" : [
"echo using python : {pythonVersion} : \"{buildDirFwd}/bin/python\" : {pythonIncludeDir} : {pythonLibDir} ; >> tools\\build\\src\\user-config.jam", # best to use forward slashes in user-config.jam
"bootstrap.bat --prefix={buildDir} --without-libraries=log",
"b2 -d+2 --prefix={buildDir} --toolset=msvc architecture=x86 address-model=64 --build-type=complete variant=release link=shared threading=multi cxxflags=\"/std:c++{c++Standard}\" cxxstd={c++Standard} -s ZLIB_SOURCE=%ROOT_DIR%\\Zlib\\working\\zlib-1.2.11 -s ZLIB_INCLUDE={buildDir}\\include -s ZLIB_LIBPATH={buildDir}\\lib -s ZLIB_BINARY=zlib install"

],

},
}
Loading

0 comments on commit 5f2eee1

Please sign in to comment.