diff --git a/.gitignore b/.gitignore index a14504ea11..e3a9db477f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,3 @@ local-lib build-linux/* deps/build-linux/* **/.DS_Store -resources/plugins diff --git a/src/libslic3r/Format/STEP.cpp b/src/libslic3r/Format/STEP.cpp index 7730b835a0..b816619223 100644 --- a/src/libslic3r/Format/STEP.cpp +++ b/src/libslic3r/Format/STEP.cpp @@ -6,6 +6,7 @@ #include "libslic3r/Utils.hpp" #include +#include #include #include @@ -27,7 +28,7 @@ LoadStepFn get_load_step_fn() constexpr const char* fn_name = "load_step_internal"; if (!load_step_fn) { - auto libpath = boost::filesystem::path(resources_dir()) / "plugins"; + auto libpath = boost::dll::program_location().parent_path(); #ifdef _WIN32 libpath /= "OCCTWrapper.dll"; HMODULE module = LoadLibraryW(libpath.wstring().c_str()); diff --git a/src/occt_wrapper/CMakeLists.txt b/src/occt_wrapper/CMakeLists.txt index 4e78b83ebf..84f91f2f50 100644 --- a/src/occt_wrapper/CMakeLists.txt +++ b/src/occt_wrapper/CMakeLists.txt @@ -5,8 +5,8 @@ add_library(OCCTWrapper MODULE OCCTWrapper.cpp) set_target_properties(OCCTWrapper PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "${SLIC3R_RESOURCES_DIR}/plugins" - RUNTIME_OUTPUT_DIRECTORY "${SLIC3R_RESOURCES_DIR}/plugins" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/src" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/src" PREFIX "" ) @@ -49,3 +49,5 @@ target_include_directories(OCCTWrapper PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(OCCTWrapper PUBLIC ${OpenCASCADE_INCLUDE_DIR}) target_link_libraries(OCCTWrapper ${OCCT_LIBS}) +install(TARGETS OCCTWrapper DESTINATION "${CMAKE_INSTALL_BINDIR}") +