@@ -1196,9 +1196,15 @@ if(NOT ${universal_build})
11961196 set (ASTCENC_ISA_SSE2 OFF )
11971197 endif ()
11981198
1199+ if (${ASTCENC_DECOMPRESSOR} )
1200+ set (ASTCENC_LIB_NAME astcdec)
1201+ else ()
1202+ set (ASTCENC_LIB_NAME astcenc)
1203+ endif ()
1204+
11991205 # "" in the CACHE sets causes use of the existing documentation string.
12001206 if (${ASTCENC_ISA_NONE} )
1201- set (ASTCENC_LIB_TARGET astcenc -none-static)
1207+ set (ASTCENC_LIB_TARGET ${ASTCENC_LIB_NAME} -none-static)
12021208 if (CPU_ARCHITECTURE STREQUAL x86_64)
12031209 set (ASTCENC_ISA_AVX2 OFF CACHE BOOL "" FORCE )
12041210 set (ASTCENC_ISA_SSE41 OFF CACHE BOOL "" FORCE )
@@ -1207,27 +1213,27 @@ if(NOT ${universal_build})
12071213 else ()
12081214 if (CPU_ARCHITECTURE STREQUAL x86_64)
12091215 if (${ASTCENC_ISA_SSE41} )
1210- set (ASTCENC_LIB_TARGET astcenc -sse4.1-static)
1216+ set (ASTCENC_LIB_TARGET ${ASTCENC_LIB_NAME} -sse4.1-static)
12111217 set (ASTCENC_ISA_AVX2 OFF CACHE BOOL "" FORCE )
12121218 set (ASTCENC_ISA_SSE2 OFF CACHE BOOL "" FORCE )
12131219 elseif (${ASTCENC_ISA_SSE2} )
1214- set (ASTCENC_LIB_TARGET astcenc -sse2-static)
1220+ set (ASTCENC_LIB_TARGET ${ASTCENC_LIB_NAME} -sse2-static)
12151221 set (ASTCENC_ISA_AVX2 OFF CACHE BOOL "" FORCE )
12161222 set (ASTCENC_ISA_SSE41 OFF CACHE BOOL "" FORCE )
12171223 else ()
1218- set (ASTCENC_LIB_TARGET astcenc -avx2-static)
1224+ set (ASTCENC_LIB_TARGET ${ASTCENC_LIB_NAME} -avx2-static)
12191225 set (ASTCENC_ISA_AVX2 ON CACHE BOOL "" FORCE )
12201226 set (ASTCENC_ISA_SSE41 OFF CACHE BOOL "" FORCE )
12211227 set (ASTCENC_ISA_SSE2 OFF CACHE BOOL "" FORCE )
12221228 endif ()
12231229 elseif (CPU_ARCHITECTURE STREQUAL armv8 OR CPU_ARCHITECTURE STREQUAL arm64)
1224- set (ASTCENC_LIB_TARGET astcenc -neon-static)
1230+ set (ASTCENC_LIB_TARGET ${ASTCENC_LIB_NAME} -neon-static)
12251231 set (ASTCENC_ISA_NEON ON )
12261232 set (ASTCENC_ISA_NONE OFF CACHE BOOL "" FORCE )
12271233 else ()
12281234 message (STATUS "Unsupported ISA for ASTC on ${CPU_ARCHITECTURE} arch, using ASTCENC_ISA_NONE." )
12291235 set (ASTCENC_ISA_NONE ON CACHE BOOL "" FORCE )
1230- set (ASTCENC_LIB_TARGET astcenc -none-static)
1236+ set (ASTCENC_LIB_TARGET ${ASTCENC_LIB_NAME} -none-static)
12311237 endif ()
12321238 endif ()
12331239endif ()
0 commit comments