@@ -21,14 +21,14 @@ endif()
2121
2222# ======== Platform-specific file extensions ========
2323if (WIN32 )
24- set (LIB_EXT " .dll" )
25- set (IMPLIB_EXT " .lib" )
24+ set (JPG_RUNTIME_NAME "turbojpeg .dll" )
25+ set (JPG_IMPLIB_NAME "turbojpeg .lib" )
2626elseif (APPLE )
27- set (LIB_EXT " .dylib" )
28- set (IMPLIB_EXT "" ) # No import libs on macOS
27+ set (JPG_RUNTIME_NAME "libturbojpeg .dylib" )
28+ set (JPG_IMPLIB_NAME "" ) # No import libs on macOS
2929else ()
30- set (LIB_EXT " .so" )
31- set (IMPLIB_EXT "" ) # No import libs on Linux
30+ set (JPG_RUNTIME_NAME "libturbojpeg .so" )
31+ set (JPG_IMPLIB_NAME "" ) # No import libs on Linux
3232endif ()
3333
3434# ======== External build directory ========
@@ -67,27 +67,27 @@ if(IS_MULTI_CONFIG)
6767
6868 # Set runtime library
6969 set_target_properties (libjpeg-turbo::libjpeg-turbo PROPERTIES
70- "IMPORTED_LOCATION_${cfg_upper} " "${cfg_bin_dir} /turbojpeg ${LIB_EXT } "
70+ "IMPORTED_LOCATION_${cfg_upper} " "${cfg_bin_dir} /${JPG_RUNTIME_NAME } "
7171 )
7272
7373 # Set import library on Windows
7474 if (WIN32 )
7575 set_target_properties (libjpeg-turbo::libjpeg-turbo PROPERTIES
76- "IMPORTED_IMPLIB_${cfg_upper} " "${cfg_bin_dir} /turbojpeg ${IMPLIB_EXT } "
76+ "IMPORTED_IMPLIB_${cfg_upper} " "${cfg_bin_dir} /${JPG_IMPLIB_NAME } "
7777 )
7878 endif ()
7979 endforeach ()
8080else ()
8181 # Single-config: flat directory
8282 set (cfg_bin_dir "${TurboJpegBinBaseDir} " )
8383 set_target_properties (libjpeg-turbo::libjpeg-turbo PROPERTIES
84- IMPORTED_LOCATION "${cfg_bin_dir} /turbojpeg ${LIB_EXT } "
84+ IMPORTED_LOCATION "${cfg_bin_dir} /${JPG_RUNTIME_NAME } "
8585 )
8686
8787 # Set import library on Windows
8888 if (WIN32 )
8989 set_target_properties (libjpeg-turbo::libjpeg-turbo PROPERTIES
90- IMPORTED_IMPLIB "${cfg_bin_dir} /turbojpeg ${IMPLIB_EXT } "
90+ IMPORTED_IMPLIB "${cfg_bin_dir} /${JPG_IMPLIB_NAME } "
9191 )
9292 endif ()
9393endif ()
0 commit comments