mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 16:15:59 +08:00
Switch to statically linked OCCTWrapper on Apple.
Due to dmg notarization issues
This commit is contained in:
parent
2486a2363c
commit
aff337067b
@ -414,6 +414,11 @@ target_link_libraries(libslic3r
|
|||||||
qoi
|
qoi
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
# TODO: we need to fix notarization with the separate shared library
|
||||||
|
target_link_libraries(libslic3r OCCTWrapper)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (TARGET OpenVDB::openvdb)
|
if (TARGET OpenVDB::openvdb)
|
||||||
target_link_libraries(libslic3r OpenVDB::openvdb)
|
target_link_libraries(libslic3r OpenVDB::openvdb)
|
||||||
endif()
|
endif()
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
#if __APPLE__
|
||||||
|
extern "C" bool load_step_internal(const char *path, OCCTResult* res);
|
||||||
|
#endif
|
||||||
|
|
||||||
LoadStepFn get_load_step_fn()
|
LoadStepFn get_load_step_fn()
|
||||||
{
|
{
|
||||||
static LoadStepFn load_step_fn = nullptr;
|
static LoadStepFn load_step_fn = nullptr;
|
||||||
@ -47,6 +51,8 @@ LoadStepFn get_load_step_fn()
|
|||||||
FreeLibrary(module);
|
FreeLibrary(module);
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
#elif __APPLE__
|
||||||
|
load_step_fn = &load_step_internal;
|
||||||
#else
|
#else
|
||||||
libpath /= "OCCTWrapper.so";
|
libpath /= "OCCTWrapper.so";
|
||||||
void *plugin_ptr = dlopen(libpath.c_str(), RTLD_NOW | RTLD_GLOBAL);
|
void *plugin_ptr = dlopen(libpath.c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
project(OCCTWrapper)
|
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
|
set_target_properties(OCCTWrapper
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user