mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 11:40:14 +02:00
CMake targets fixes for optional vs. required packages (#369)
This commit is contained in:
parent
71aa6ba4f5
commit
40dacea267
@ -287,7 +287,7 @@ if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
|
|||||||
Texassemble/texassemble.rc
|
Texassemble/texassemble.rc
|
||||||
Texassemble/settings.manifest
|
Texassemble/settings.manifest
|
||||||
Texassemble/AnimatedGif.cpp)
|
Texassemble/AnimatedGif.cpp)
|
||||||
target_link_libraries(texassemble ${PROJECT_NAME} ole32.lib version.lib)
|
target_link_libraries(texassemble PRIVATE ${PROJECT_NAME} ole32.lib version.lib)
|
||||||
source_group(texassemble REGULAR_EXPRESSION Texassemble/*.*)
|
source_group(texassemble REGULAR_EXPRESSION Texassemble/*.*)
|
||||||
|
|
||||||
add_executable(texconv
|
add_executable(texconv
|
||||||
@ -296,24 +296,24 @@ if(BUILD_TOOLS AND BUILD_DX11 AND WIN32)
|
|||||||
Texconv/settings.manifest
|
Texconv/settings.manifest
|
||||||
Texconv/ExtendedBMP.cpp
|
Texconv/ExtendedBMP.cpp
|
||||||
Texconv/PortablePixMap.cpp)
|
Texconv/PortablePixMap.cpp)
|
||||||
target_link_libraries(texconv ${PROJECT_NAME} ole32.lib shell32.lib version.lib)
|
target_link_libraries(texconv PRIVATE ${PROJECT_NAME} ole32.lib shell32.lib version.lib)
|
||||||
source_group(texconv REGULAR_EXPRESSION Texconv/*.*)
|
source_group(texconv REGULAR_EXPRESSION Texconv/*.*)
|
||||||
|
|
||||||
add_executable(texdiag
|
add_executable(texdiag
|
||||||
Texdiag/texdiag.cpp
|
Texdiag/texdiag.cpp
|
||||||
Texdiag/texdiag.rc
|
Texdiag/texdiag.rc
|
||||||
Texdiag/settings.manifest)
|
Texdiag/settings.manifest)
|
||||||
target_link_libraries(texdiag ${PROJECT_NAME} ole32.lib version.lib)
|
target_link_libraries(texdiag PRIVATE ${PROJECT_NAME} ole32.lib version.lib)
|
||||||
source_group(texdiag REGULAR_EXPRESSION Texdiag/*.*)
|
source_group(texdiag REGULAR_EXPRESSION Texdiag/*.*)
|
||||||
|
|
||||||
if(BC_USE_OPENMP)
|
if(BC_USE_OPENMP)
|
||||||
target_link_libraries(texconv OpenMP::OpenMP_CXX)
|
target_link_libraries(texconv PRIVATE OpenMP::OpenMP_CXX)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_OPENEXR_SUPPORT)
|
if(ENABLE_OPENEXR_SUPPORT)
|
||||||
foreach(t IN LISTS TOOL_EXES)
|
foreach(t IN LISTS TOOL_EXES)
|
||||||
target_include_directories(${t} PRIVATE Auxiliary)
|
target_include_directories(${t} PRIVATE Auxiliary)
|
||||||
target_link_libraries(${t} ${OPENEXR_ILMIMF_LIBRARY})
|
target_link_libraries(${t} PRIVATE ${OPENEXR_ILMIMF_LIBRARY})
|
||||||
target_compile_options(${t} PRIVATE -DUSE_OPENEXR)
|
target_compile_options(${t} PRIVATE -DUSE_OPENEXR)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
@ -337,7 +337,7 @@ if(BUILD_SAMPLE AND BUILD_DX11 AND WIN32)
|
|||||||
DDSView/ddsview.cpp
|
DDSView/ddsview.cpp
|
||||||
DDSView/ddsview.rc
|
DDSView/ddsview.rc
|
||||||
${COMPILED_DDSVIEW_SHADERS}/ddsview_ps1D.inc)
|
${COMPILED_DDSVIEW_SHADERS}/ddsview_ps1D.inc)
|
||||||
target_link_libraries(ddsview ${PROJECT_NAME} d3d11.lib ole32.lib)
|
target_link_libraries(ddsview PRIVATE ${PROJECT_NAME} d3d11.lib ole32.lib)
|
||||||
source_group(ddsview REGULAR_EXPRESSION DDSView/*.*)
|
source_group(ddsview REGULAR_EXPRESSION DDSView/*.*)
|
||||||
|
|
||||||
target_include_directories(ddsview PRIVATE ${COMPILED_DDSVIEW_SHADERS})
|
target_include_directories(ddsview PRIVATE ${COMPILED_DDSVIEW_SHADERS})
|
||||||
@ -356,7 +356,7 @@ endif()
|
|||||||
|
|
||||||
if(directxmath_FOUND)
|
if(directxmath_FOUND)
|
||||||
foreach(t IN LISTS TOOL_EXES)
|
foreach(t IN LISTS TOOL_EXES)
|
||||||
target_link_libraries(${t} Microsoft::DirectXMath)
|
target_link_libraries(${t} PRIVATE Microsoft::DirectXMath)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -14,8 +14,11 @@ if(ENABLE_OPENEXR_SUPPORT)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MINGW OR (NOT WIN32))
|
if(MINGW OR (NOT WIN32))
|
||||||
find_dependency(directx-headers CONFIG)
|
find_dependency(directx-headers)
|
||||||
find_dependency(directxmath CONFIG)
|
find_dependency(directxmath)
|
||||||
|
else()
|
||||||
|
find_package(directx-headers CONFIG QUIET)
|
||||||
|
find_package(directxmath CONFIG QUIET)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_required_components("@PROJECT_NAME@")
|
check_required_components("@PROJECT_NAME@")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user