diff -Naur libaec-v1.0.5_orig/cmake/libaec-config.cmake.in libaec-v1.0.5/cmake/libaec-config.cmake.in
--- libaec-v1.0.5_orig/cmake/libaec-config.cmake.in	2021-06-16 11:51:34.000000000 +0200
+++ libaec-v1.0.5/cmake/libaec-config.cmake.in	2021-06-21 14:11:38.759582700 +0200
@@ -27,20 +27,20 @@
 find_path(libaec_INCLUDE_DIR NAMES libaec.h DOC "AEC include directory")
 find_path(SZIP_INCLUDE_DIR NAMES szlib.h DOC "SZIP include directory")
 if (libaec_USE_STATIC_LIBS)
-  if (WIN32)
-    find_library(libaec_LIBRARY NAMES aec_static.lib DOC "AEC library")
-    find_library(SZIP_LIBRARY NAMES szip_static.lib DOC "SZIP compatible version of the AEC library")
+  if (MSVC)
+    find_library(libaec_LIBRARY NAMES aec_static DOC "AEC library")
+    find_library(SZIP_LIBRARY NAMES szip_static DOC "SZIP compatible version of the AEC library")
   else ()
-    find_library(libaec_LIBRARY NAMES libaec.a DOC "AEC library")
-    find_library(SZIP_LIBRARY NAMES libsz.a DOC "SZIP compatible version of the AEC library")
+    find_library(libaec_LIBRARY NAMES libaec DOC "AEC library")
+    find_library(SZIP_LIBRARY NAMES libszip DOC "SZIP compatible version of the AEC library")
   endif ()
 else ()
-  if (WIN32)
-    find_library(libaec_LIBRARY NAMES aec.lib DOC "AEC library")
-    find_library(SZIP_LIBRARY NAMES szip.lib DOC "SZIP compatible version of the AEC library")
+  if (MSVC)
+    find_library(libaec_LIBRARY NAMES aec DOC "AEC library")
+    find_library(SZIP_LIBRARY NAMES szip DOC "SZIP compatible version of the AEC library")
   else ()
-    find_library(libaec_LIBRARY NAMES libaec.so DOC "AEC library")
-    find_library(SZIP_LIBRARY NAMES libsz.so DOC "SZIP compatible version of the AEC library")
+    find_library(libaec_LIBRARY NAMES libaec DOC "AEC library")
+    find_library(SZIP_LIBRARY NAMES libszip DOC "SZIP compatible version of the AEC library")
   endif ()
 endif ()
 
diff -Naur libaec-v1.0.5_orig/src/CMakeLists.txt libaec-v1.0.5/src/CMakeLists.txt
--- libaec-v1.0.5_orig/src/CMakeLists.txt	2021-06-16 11:51:34.000000000 +0200
+++ libaec-v1.0.5/src/CMakeLists.txt	2021-06-21 23:50:24.406689600 +0200
@@ -15,7 +15,7 @@
 target_link_libraries(aec_static PUBLIC aec)
 set_target_properties(aec_static
   PROPERTIES
-  OUTPUT_NAME $<IF:$<BOOL:${WIN32}>,aec_static,aec>)
+  OUTPUT_NAME $<IF:$<BOOL:${MSVC}>,aec_static,aec>)
 
 add_library(aec_shared SHARED "$<TARGET_OBJECTS:aec>")
 target_link_libraries(aec_shared PUBLIC aec)
@@ -34,7 +34,7 @@
 add_library(sz_static STATIC "$<TARGET_OBJECTS:sz>" "$<TARGET_OBJECTS:aec>")
 set_target_properties(sz_static
   PROPERTIES
-  OUTPUT_NAME $<IF:$<BOOL:${WIN32}>,szip_static,sz>)
+  OUTPUT_NAME $<IF:$<BOOL:${MSVC}>,szip_static,szip>)
 target_link_libraries(sz_static PUBLIC sz)
 
 add_library(sz_shared SHARED "$<TARGET_OBJECTS:sz>" "$<TARGET_OBJECTS:aec>")
@@ -43,7 +43,7 @@
   PROPERTIES
   VERSION 2.0.1
   SOVERSION 2
-  OUTPUT_NAME $<IF:$<BOOL:${WIN32}>,szip,sz>
+  OUTPUT_NAME $<IF:$<BOOL:${MSVC}>,szip,szip>
   PUBLIC_HEADER ../include/szlib.h)
 
 # Simple client for testing and benchmarking.
@@ -70,12 +70,12 @@
     ${CMAKE_CURRENT_SOURCE_DIR}/../data/typical.rz
     COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bdec.sh
     DEPENDS aec_client utime)
-
-  # Install manpage
-  install(
-    FILES aec.1
-    DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1
-    COMPONENT doc)
 endif()
 
+# Install manpage
+install(
+  FILES aec.1
+  DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1
+  COMPONENT doc)
+
 install(TARGETS aec_static aec_shared sz_static sz_shared aec_client)
