Switch to statically linked OCCTWrapper on Apple.
Due to dmg notarization issues
This commit is contained in:
parent
2486a2363c
commit
aff337067b
3 changed files with 17 additions and 1 deletions
|
@ -414,6 +414,11 @@ target_link_libraries(libslic3r
|
|||
qoi
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
# TODO: we need to fix notarization with the separate shared library
|
||||
target_link_libraries(libslic3r OCCTWrapper)
|
||||
endif ()
|
||||
|
||||
if (TARGET OpenVDB::openvdb)
|
||||
target_link_libraries(libslic3r OpenVDB::openvdb)
|
||||
endif()
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
#if __APPLE__
|
||||
extern "C" bool load_step_internal(const char *path, OCCTResult* res);
|
||||
#endif
|
||||
|
||||
LoadStepFn get_load_step_fn()
|
||||
{
|
||||
static LoadStepFn load_step_fn = nullptr;
|
||||
|
@ -47,6 +51,8 @@ LoadStepFn get_load_step_fn()
|
|||
FreeLibrary(module);
|
||||
throw;
|
||||
}
|
||||
#elif __APPLE__
|
||||
load_step_fn = &load_step_internal;
|
||||
#else
|
||||
libpath /= "OCCTWrapper.so";
|
||||
void *plugin_ptr = dlopen(libpath.c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
project(OCCTWrapper)
|
||||
|
||||
add_library(OCCTWrapper MODULE OCCTWrapper.cpp)
|
||||
if (APPLE)
|
||||
# TODO: we need to fix notarization with the separate shared library
|
||||
add_library(OCCTWrapper STATIC OCCTWrapper.cpp)
|
||||
else ()
|
||||
add_library(OCCTWrapper MODULE OCCTWrapper.cpp)
|
||||
endif ()
|
||||
|
||||
set_target_properties(OCCTWrapper
|
||||
PROPERTIES
|
||||
|
|
Loading…
Reference in a new issue