Fix warnings in tools for MinGW (#428)

This commit is contained in:
J. Peter Mugaas
2023-12-30 14:45:09 -06:00
committed by GitHub
parent 187f6d64a8
commit a3d032b8a6
8 changed files with 53 additions and 6 deletions

View File

@@ -370,9 +370,9 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/DirectXTex.pc"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
#--- Command-line tools
if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
set(TOOL_EXES texassemble texconv texdiag)
set(TOOL_EXES "")
if(BUILD_TOOLS AND WIN32)
add_executable(texassemble
Texassemble/texassemble.cpp
Texassemble/texassemble.rc
@@ -380,7 +380,10 @@ if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
Texassemble/AnimatedGif.cpp)
target_link_libraries(texassemble PRIVATE ${PROJECT_NAME} ole32.lib version.lib)
source_group(texassemble REGULAR_EXPRESSION Texassemble/*.*)
list(APPEND TOOL_EXES texassemble)
endif()
if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
add_executable(texconv
Texconv/texconv.cpp
Texconv/texconv.rc
@@ -389,18 +392,24 @@ if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
Texconv/PortablePixMap.cpp)
target_link_libraries(texconv PRIVATE ${PROJECT_NAME} ole32.lib shell32.lib version.lib)
source_group(texconv REGULAR_EXPRESSION Texconv/*.*)
list(APPEND TOOL_EXES texconv)
if(BC_USE_OPENMP)
target_link_libraries(texconv PRIVATE OpenMP::OpenMP_CXX)
endif()
endif()
if(BUILD_TOOLS AND WIN32)
add_executable(texdiag
Texdiag/texdiag.cpp
Texdiag/texdiag.rc
Texdiag/settings.manifest)
target_link_libraries(texdiag PRIVATE ${PROJECT_NAME} ole32.lib version.lib)
source_group(texdiag REGULAR_EXPRESSION Texdiag/*.*)
list(APPEND TOOL_EXES texdiag)
endif()
if(BC_USE_OPENMP)
target_link_libraries(texconv PRIVATE OpenMP::OpenMP_CXX)
endif()
if(BUILD_TOOLS AND WIN32)
if(ENABLE_OPENEXR_SUPPORT)
foreach(t IN LISTS TOOL_EXES)
target_include_directories(${t} PRIVATE Auxiliary)