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 6fead2d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 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/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 6fead2d

Please sign in to comment.