Complete CMake variable migration, fix schema library installation by starseeker · Pull Request #469 · stepcode/stepcode
First experience -- I haven't dug in much yet.
SC_INSTALL_PREFIX is ignored, switching to CMAKE_INSTALL_PREFIX fixes the issue.
Building with:
-DBUILD_STATIC_LIBS=ON
-DBUILD_SHARED_LIBS=OFF
causes
[174/187] Linking CXX executable bin/lazy_test
FAILED: [code=1] bin/lazy_test
: && /usr/bin/c++ -O2 -g -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/homebrew/opt/openblas/lib src/cllazyfile/CMakeFiles/lazy_test.dir/lazy_test.cc.o src/cllazyfile/CMakeFiles/lazy_test.dir/sc_benchmark.cc.o -o bin/lazy_test -lsteplazyfile -lstepeditor && :
ld: library 'steplazyfile' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Keeping shared libs on allows this to proceed. Since I am only using static libraries and the build is contained within my SuperProject, I would prefer to not build anything that is not needed.
All the static libraries are now suffixed with -static. This (IMO) makes things like FindSTEPCode.cmake more complicated as the library names are now different static vs dynamic.
/lib/libbase.a is no longer a thing. It appears to not be needed.
My program is essentially the same as example/ap203min/ap203min.cpp.
The API has changed somewhat. I use Raw(), which does not exist anymore. I updated my use to match some changes Chris made to ap203min earlier and got past that.
/Users/ramcdona/Documents/OpenVSP/repo/src/util/CADutil.cpp:109:27: error: no member named 'Raw' in 'STEPattribute'
109 | attr->Raw()->e = new SdaiSi_prefix_var( pfx );
| ~~~~ ^
Line 713 of ap203min.cpp
instance_list->DeleteInstances();
Triggers a double-free crash. I'm not sure if that was always a problem (and I just missed it) or if it reflects another API change. However, commenting out the equivalent line in my program seems to have things working.
This is only on MacOS so far. I'll have to also try Windows and Linux (I had to have some odd platform specific CMake stuff before, hopefully that is better).
I haven't done much testing, but a trivially simple file seems to work.
Thanks for all your work on this.