Skip to content

Commit

Permalink
Fixed: compilation for MINGW
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNicker committed Jun 22, 2024
1 parent c93dc35 commit 858f558
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Codecs/CodecJPG/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ add_subdirectory(${libjpeg-turboFolder} ./external/libjpeg-turbo)
target_include_directories(${TargetName} PRIVATE ${libjpeg-turboFolder})

target_link_libraries(${TargetName} turbojpeg)
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND NOT MINGW)
target_link_options(${TargetName} PUBLIC "/DELAYLOAD:$<TARGET_FILE_BASE_NAME:turbojpeg>.dll")
else()
endif()
2 changes: 1 addition & 1 deletion Codecs/CodecPNG/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ target_include_directories(${TargetName} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ext
target_link_libraries(${TargetName} png_shared )
target_include_directories(png_shared PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/external/zlib)

if(MSVC)
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC"))
target_link_options(${TargetName} PUBLIC "/DELAYLOAD:$<TARGET_FILE_BASE_NAME:png_shared>.dll")
target_link_options(${TargetName} PUBLIC "/DELAYLOAD:$<TARGET_FILE_BASE_NAME:zlib>.dll")
endif()
3 changes: 1 addition & 2 deletions Codecs/CodecTiff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ target_include_directories(${TargetName} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/ext


target_link_libraries(${TargetName} tiff)
if(MSVC)
#set_property(TARGET tiff PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS true)
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows" AND NOT MINGW)
target_link_options(${TargetName} PUBLIC "/DELAYLOAD:$<TARGET_FILE_BASE_NAME:tiff>.dll")
endif()
2 changes: 1 addition & 1 deletion External/libpsd
Submodule libpsd updated 1 files
+2 −2 CMakeLists.txt
2 changes: 1 addition & 1 deletion ImageUtil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ add_library (${TargetName} STATIC ${sourceFiles})

target_include_directories(${TargetName} PRIVATE ./Include)
target_include_directories(${TargetName} PRIVATE ./Source)
target_include_directories(${TargetName} PRIVATE ../External/ExoticNumbers/Include)
target_include_directories(${TargetName} PRIVATE ../External/ExoticNumbers/include)
2 changes: 1 addition & 1 deletion ImageUtil/Include/ImageUtil/ImageUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ namespace IMUtil
std::span sourceData(reinterpret_cast<const SourceSampleType*>(sampleData), totalPixels);
std::span bgraData(reinterpret_cast<PixelUtil::BitTexel32Ex*>(imageItem->data.data()), totalPixels);
//Find minMax is a single pass since image data is consecutive
auto minMax = std::minmax_element(std::execution::parallel_unsequenced_policy(), std::begin(sourceData), std::end(sourceData));
auto minMax = std::minmax_element(std::execution::par_unseq, std::begin(sourceData), std::end(sourceData));
NormalizeAnyToRGBA(std::begin(bgraData), std::end(bgraData), std::begin(sourceData), std::end(sourceData), normalizeMode, std::make_pair(*minMax.first, *minMax.second) );
}
else
Expand Down
2 changes: 1 addition & 1 deletion ImageUtil/Source/ImageUtil.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <ImageUtil/ImageUtil.h>
#include <ImageUtil\TexelConvertor.h>
#include <ImageUtil/TexelConvertor.h>
#include <ExoticNumbers/Float24.h>
#include <ExoticNumbers/half.hpp>

Expand Down

0 comments on commit 858f558

Please sign in to comment.