mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Fix unit tests (#11199)
* Fix tests build issue on Windows * Fix `Http digest authentication` 404 error * Fix `libnest2d_tests` missing dlls on Windows
This commit is contained in:
@@ -99,9 +99,6 @@ if(ORCA_TOOLS)
|
||||
endif()
|
||||
target_link_libraries(OrcaSlicer_profile_validator libslic3r boost_headeronly libcurl OpenSSL::SSL OpenSSL::Crypto)
|
||||
target_compile_definitions(OrcaSlicer_profile_validator PRIVATE -DBOOST_ALL_NO_LIB -DBOOST_USE_WINAPI_VERSION=0x602 -DBOOST_SYSTEM_USE_UTF8)
|
||||
if(WIN32)
|
||||
target_link_libraries(OrcaSlicer_profile_validator bcrypt.lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Create a slic3r executable
|
||||
@@ -110,7 +107,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dev-utils/platform/msw/OrcaSlicer.rc.
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dev-utils/platform/msw/OrcaSlicer.manifest.in ${CMAKE_CURRENT_BINARY_DIR}/OrcaSlicer.manifest @ONLY)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dev-utils/platform/osx/Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist @ONLY)
|
||||
if (WIN32)
|
||||
add_library(OrcaSlicer SHARED OrcaSlicer.cpp OrcaSlicer.hpp dev-utils/BaseException.cpp dev-utils/BaseException.h dev-utils/StackWalker.cpp dev-utils/StackWalker.h)
|
||||
add_library(OrcaSlicer SHARED OrcaSlicer.cpp OrcaSlicer.hpp)
|
||||
else ()
|
||||
add_executable(OrcaSlicer OrcaSlicer.cpp OrcaSlicer.hpp)
|
||||
endif ()
|
||||
|
||||
@@ -314,7 +314,7 @@ BOOL CBaseException::GetLogicalAddress(
|
||||
for (unsigned i = 0; i < pNtHdr->FileHeader.NumberOfSections; i++, pSection++ )
|
||||
{
|
||||
DWORD sectionStart = pSection->VirtualAddress;
|
||||
DWORD sectionEnd = sectionStart + max(pSection->SizeOfRawData, pSection->Misc.VirtualSize);
|
||||
DWORD sectionEnd = sectionStart + std::max(pSection->SizeOfRawData, pSection->Misc.VirtualSize);
|
||||
|
||||
if ( (rva >= sectionStart) && (rva <= sectionEnd) )
|
||||
{
|
||||
|
||||
@@ -591,12 +591,12 @@ target_link_libraries(libslic3r
|
||||
TBB::tbb
|
||||
TBB::tbbmalloc
|
||||
ZLIB::ZLIB
|
||||
OpenSSL::Crypto
|
||||
)
|
||||
|
||||
if(NOT WIN32)
|
||||
# Link freetype for OCCT dependency (CAD operations need font rendering)
|
||||
target_link_libraries(libslic3r PRIVATE ${FREETYPE_LIBRARIES})
|
||||
target_link_libraries(libslic3r PRIVATE OpenSSL::Crypto)
|
||||
if (NOT APPLE)
|
||||
target_link_libraries(libslic3r PRIVATE fontconfig)
|
||||
endif()
|
||||
@@ -613,7 +613,7 @@ if (TARGET OpenVDB::openvdb)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(libslic3r PRIVATE Psapi.lib)
|
||||
target_link_libraries(libslic3r PRIVATE Psapi.lib bcrypt.lib)
|
||||
endif()
|
||||
|
||||
if(SLIC3R_PROFILE)
|
||||
|
||||
@@ -675,7 +675,17 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/GeneratedConfig.hpp.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/GeneratedConfig.hpp
|
||||
@ONLY)
|
||||
|
||||
add_library(libslic3r_gui STATIC ${SLIC3R_GUI_SOURCES})
|
||||
if (WIN32)
|
||||
add_library(libslic3r_gui STATIC
|
||||
${SLIC3R_GUI_SOURCES}
|
||||
../dev-utils/BaseException.cpp
|
||||
../dev-utils/BaseException.h
|
||||
../dev-utils/StackWalker.cpp
|
||||
../dev-utils/StackWalker.h
|
||||
)
|
||||
else ()
|
||||
add_library(libslic3r_gui STATIC ${SLIC3R_GUI_SOURCES})
|
||||
endif ()
|
||||
target_include_directories(libslic3r_gui PRIVATE Utils ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
if (WIN32)
|
||||
|
||||
Reference in New Issue
Block a user