Thank you Lucas for the quick response. Unfortunately after a lot of trial and errors I am still not able to get it to work under python. Here is what I've tried so far.
During CMake generation I select USE_HD5 and USE_PYALEMBIC options in the CMake-GUI and create the build files for VS2022.
If I try "cmake --target install" I get following error
D:\Alembic\alembic-1.8.5>cmake --target install
CMake Error: Unknown argument --target
CMake Error: Run 'cmake --help' for all supported options.
looking at this (
https://stackoverflow.com/questions/70945720/what-happened-to-cmakes-target-argument ) I am suppose to provide the build directory for cmake like this:
D:\Alembic\alembic-1.8.5>cmake --build ../alembic-1.8.5-build --target install
After this I get an error that I have to use /bigobj compiler option to compile pyalembic, so I added the following lines to the main CMakeLists.txt file:
IF (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
ENDIF()
then I get linker error for Alembic Tests. So I unchecked USE_TESTS from the CMake-GUI and rebuilt the CMake cache. After that I get another linker error for the debug mode:
fatal error LNK1104: cannot open file 'python38_d.lib'
So I switched to compiling in release mode using
D:\Alembic\alembic-1.8.5>cmake --build ../alembic-1.8.5-build --config Release --target install
This went well, expect when I try to import alembic in python it is still not installed.
D:\Alembic\alembic-1.8.5>python
Python 3.8.10 (tags/v3.8.10:3d8993a, May 3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import alembic
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'alembic'
>>>
Maybe it is my lack of familiarity with Alembic and CMake that is causing some issues, but how can I install it so that I can import alembic under python. Thanks again.