Hi all, 

I want to test the JPEG encode into HEIC, so I build libjpeg by myself although I'm not familiar to cmake and Windows programming. But when using the command:

`cmake .. -DPNG_LIBRARY=e:\Downloads\libheif-master\lib\ -DPNG_PNG_INCLUDE_DIR=e:\Downloads\libheif-master\include\ 
-DZLIB_LIBRARY=e:\Downloads\libheif-master\lib\ -DZLIB_INCLUDE_DIR=e:\Downloads\libheif-master\include\ 
-DJPEG_LIBRARY=e:\Downloads\libheif-master\lib\ -DJPEG_INCLUDE_DIR=e:\Downloads\libheif-master\include\ 
-DLIBDE265_INCLUDE_DIR=e:\Downloads\libheif-master\include\ -DLIBDE265_LIBRARY=e:\Downloads\libheif-master\lib\ 
-DX265_INCLUDE_DIR=e:\Downloads\libheif-master\include\ -DX265_LIBRARY=e:\Downloads\libheif-master\lib\`

It runs into error, the whole log as below, I don't know how to fix this.

```command line
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
-- The C compiler identification is MSVC 19.38.33133.0
-- The CXX compiler identification is MSVC 19.38.33133.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Performing Test has_potentially_evaluated_expression
-- Performing Test has_potentially_evaluated_expression - Failed
-- Found LIBDE265
-- Found LIBDE265: e:/Downloads/libheif-master/include
-- Found X265
-- Found X265: e:/Downloads/libheif-master/include
-- Looking for AOM_USAGE_GOOD_QUALITY
-- Looking for AOM_USAGE_GOOD_QUALITY - not found
CMake Warning at cmake/modules/LibFindMacros.cmake:267 (message):
  WARNING: MISSING PACKAGE

  We could not find development headers for AOM.  Do you have the necessary
  dev package installed? This package is NOT REQUIRED and you may ignore this
  warning but by doing so you may miss some functionality of libheif.

  Relevant CMake configuration variables:

    AOM_INCLUDE_DIR=<not found>
    AOM_LIBRARY=<not found>

  You may use CMake GUI, cmake -D or ccmake to modify the values.  Delete
  CMakeCache.txt to discard all values and force full re-detection if
  necessary.

Call Stack (most recent call first):
  cmake/modules/FindAOM.cmake:35 (libfind_process)
  CMakeLists.txt:140 (find_package)


-- Could NOT find AOM (missing: AOM_INCLUDE_DIR AOM_LIBRARIES)
=== Summary of compiled codecs ===
libde265 HEVC decoder        : + built-in
FFMPEG HEVC decoder (HW acc) : - disabled
x265 HEVC encoder            : + built-in
Kvazaar HEVC encoder         : - disabled
AOM AV1 decoder              : - not found
AOM AV1 encoder              : - not found
Dav1d AV1 decoder            : - disabled
SVT AV1 encoder              : - disabled
Rav1e AV1 encoder            : - disabled
JPEG decoder                 : - disabled
JPEG encoder                 : - disabled
OpenJPEG J2K decoder         : - disabled
OpenJPEG J2K encoder         : - disabled
CMake Warning at cmake/modules/LibFindMacros.cmake:267 (message):
  WARNING: MISSING PACKAGE

  We could not find development headers for LIBSHARPYUV.  Do you have the
  necessary dev package installed? This package is NOT REQUIRED and you may
  ignore this warning but by doing so you may miss some functionality of
  libheif.

  Relevant CMake configuration variables:

    LIBSHARPYUV_INCLUDE_DIR=<not found>
    LIBSHARPYUV_LIBRARY=<not found>

  You may use CMake GUI, cmake -D or ccmake to modify the values.  Delete
  CMakeCache.txt to discard all values and force full re-detection if
  necessary.

Call Stack (most recent call first):
  cmake/modules/Findlibsharpyuv.cmake:18 (libfind_process)
  CMakeLists.txt:207 (find_package)


-- Could NOT find libsharpyuv (missing: LIBSHARPYUV_INCLUDE_DIR LIBSHARPYUV_LIBRARIES)
libsharpyuv: disabled
-- Looking for _LIBCPP_VERSION
-- Looking for _LIBCPP_VERSION - not found
-- Found JPEG: e:\Downloads\libheif-master\lib\ (found version "62")
-- Performing Test HAVE_JPEG_WRITE_ICC_PROFILE
CMake Error at E:/Downloads/libheif-master/build/CMakeFiles/CMakeScratch/TryCompile-h9ctai/CMakeLists.txt:32:
  Parse error.  Function missing ending ")".  Instead found unterminated
  string with text "e:\Downloads\libheif-master\lib\" )

  ".


CMake Error at C:/Program Files/CMake/share/cmake-3.29/Modules/Internal/CheckSourceCompiles.cmake:101 (try_compile):
  Failed to configure test project build system.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.29/Modules/CheckCXXSourceCompiles.cmake:52 (cmake_check_source_compiles)
  examples/CMakeLists.txt:69 (check_cxx_source_compiles)


-- Configuring incomplete, errors occurred!
```

If I took off the `-DJPEG_LIBRARY=e:\Downloads\libheif-master\lib\ -DJPEG_INCLUDE_DIR=e:\Downloads\libheif-master\include\ ` from command, it can generate build file normally.

All my libraries are in the `E:/Downloads/libheif-master/lib` and include files are in `E:/Downloads/libheif-master/include`
Under the lib directory, I put files list as below:

jpegtran-static.exe
tjbench.exe
tjunittest.exe
cjpeg-static.exe
djpeg-static.exe
tjunittest-static.exe
tjbench-static.exe
djpeg.exe
cjpeg.exe
tjexample.exe
jcstest.exe
jpegtran.exe
turbojpeg.dll
turbojpeg.lib
turbojpeg.exp
turbojpeg-static.lib
jpeg62.dll
jpeg.lib
jpeg.exp
libjpeg_a.lib
rdjpgcom.exe
wrjpgcom.exe
libpng.dll
libpng.lib
zlib.dll
zlib.lib
openjp2.dll
openjp2.lib
jpeg62.pdb
turbojpeg.pdb
libde265.pdb
libde265.dll
libx265.dll
libx265.lib
x265.lib
x265.exe
libx265.exp
libde265.lib
de265.exp
libpng3.dll
libpng12.dll
zlib1.dll

Is there something I missed? How can I do to this? 

Environment: Windows 11 24H2
When cmake with JPEG will failed: CMakeLists.txt:32:   Parse error.  Function missing ending ")".
This is a GitHub Issue
repo:libheif
owner:strukturag
Title : When cmake with JPEG will failed: CMakeLists.txt:32:   Parse error.  Function missing ending ")".
Issue date:

--- start body ---
Hi all, 

I want to test the JPEG encode into HEIC, so I build libjpeg by myself although I'm not familiar to cmake and Windows programming. But when using the command:

`cmake .. -DPNG_LIBRARY=e:\Downloads\libheif-master\lib\ -DPNG_PNG_INCLUDE_DIR=e:\Downloads\libheif-master\include\ 
-DZLIB_LIBRARY=e:\Downloads\libheif-master\lib\ -DZLIB_INCLUDE_DIR=e:\Downloads\libheif-master\include\ 
-DJPEG_LIBRARY=e:\Downloads\libheif-master\lib\ -DJPEG_INCLUDE_DIR=e:\Downloads\libheif-master\include\ 
-DLIBDE265_INCLUDE_DIR=e:\Downloads\libheif-master\include\ -DLIBDE265_LIBRARY=e:\Downloads\libheif-master\lib\ 
-DX265_INCLUDE_DIR=e:\Downloads\libheif-master\include\ -DX265_LIBRARY=e:\Downloads\libheif-master\lib\`

It runs into error, the whole log as below, I don't know how to fix this.

```command line
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
-- The C compiler identification is MSVC 19.38.33133.0
-- The CXX compiler identification is MSVC 19.38.33133.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Performing Test has_potentially_evaluated_expression
-- Performing Test has_potentially_evaluated_expression - Failed
-- Found LIBDE265
-- Found LIBDE265: e:/Downloads/libheif-master/include
-- Found X265
-- Found X265: e:/Downloads/libheif-master/include
-- Looking for AOM_USAGE_GOOD_QUALITY
-- Looking for AOM_USAGE_GOOD_QUALITY - not found
CMake Warning at cmake/modules/LibFindMacros.cmake:267 (message):
  WARNING: MISSING PACKAGE

  We could not find development headers for AOM.  Do you have the necessary
  dev package installed? This package is NOT REQUIRED and you may ignore this
  warning but by doing so you may miss some functionality of libheif.

  Relevant CMake configuration variables:

    AOM_INCLUDE_DIR=<not found>
    AOM_LIBRARY=<not found>

  You may use CMake GUI, cmake -D or ccmake to modify the values.  Delete
  CMakeCache.txt to discard all values and force full re-detection if
  necessary.

Call Stack (most recent call first):
  cmake/modules/FindAOM.cmake:35 (libfind_process)
  CMakeLists.txt:140 (find_package)


-- Could NOT find AOM (missing: AOM_INCLUDE_DIR AOM_LIBRARIES)
=== Summary of compiled codecs ===
libde265 HEVC decoder        : + built-in
FFMPEG HEVC decoder (HW acc) : - disabled
x265 HEVC encoder            : + built-in
Kvazaar HEVC encoder         : - disabled
AOM AV1 decoder              : - not found
AOM AV1 encoder              : - not found
Dav1d AV1 decoder            : - disabled
SVT AV1 encoder              : - disabled
Rav1e AV1 encoder            : - disabled
JPEG decoder                 : - disabled
JPEG encoder                 : - disabled
OpenJPEG J2K decoder         : - disabled
OpenJPEG J2K encoder         : - disabled
CMake Warning at cmake/modules/LibFindMacros.cmake:267 (message):
  WARNING: MISSING PACKAGE

  We could not find development headers for LIBSHARPYUV.  Do you have the
  necessary dev package installed? This package is NOT REQUIRED and you may
  ignore this warning but by doing so you may miss some functionality of
  libheif.

  Relevant CMake configuration variables:

    LIBSHARPYUV_INCLUDE_DIR=<not found>
    LIBSHARPYUV_LIBRARY=<not found>

  You may use CMake GUI, cmake -D or ccmake to modify the values.  Delete
  CMakeCache.txt to discard all values and force full re-detection if
  necessary.

Call Stack (most recent call first):
  cmake/modules/Findlibsharpyuv.cmake:18 (libfind_process)
  CMakeLists.txt:207 (find_package)


-- Could NOT find libsharpyuv (missing: LIBSHARPYUV_INCLUDE_DIR LIBSHARPYUV_LIBRARIES)
libsharpyuv: disabled
-- Looking for _LIBCPP_VERSION
-- Looking for _LIBCPP_VERSION - not found
-- Found JPEG: e:\Downloads\libheif-master\lib\ (found version "62")
-- Performing Test HAVE_JPEG_WRITE_ICC_PROFILE
CMake Error at E:/Downloads/libheif-master/build/CMakeFiles/CMakeScratch/TryCompile-h9ctai/CMakeLists.txt:32:
  Parse error.  Function missing ending ")".  Instead found unterminated
  string with text "e:\Downloads\libheif-master\lib\" )

  ".


CMake Error at C:/Program Files/CMake/share/cmake-3.29/Modules/Internal/CheckSourceCompiles.cmake:101 (try_compile):
  Failed to configure test project build system.
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.29/Modules/CheckCXXSourceCompiles.cmake:52 (cmake_check_source_compiles)
  examples/CMakeLists.txt:69 (check_cxx_source_compiles)


-- Configuring incomplete, errors occurred!
```

If I took off the `-DJPEG_LIBRARY=e:\Downloads\libheif-master\lib\ -DJPEG_INCLUDE_DIR=e:\Downloads\libheif-master\include\ ` from command, it can generate build file normally.

All my libraries are in the `E:/Downloads/libheif-master/lib` and include files are in `E:/Downloads/libheif-master/include`
Under the lib directory, I put files list as below:

jpegtran-static.exe
tjbench.exe
tjunittest.exe
cjpeg-static.exe
djpeg-static.exe
tjunittest-static.exe
tjbench-static.exe
djpeg.exe
cjpeg.exe
tjexample.exe
jcstest.exe
jpegtran.exe
turbojpeg.dll
turbojpeg.lib
turbojpeg.exp
turbojpeg-static.lib
jpeg62.dll
jpeg.lib
jpeg.exp
libjpeg_a.lib
rdjpgcom.exe
wrjpgcom.exe
libpng.dll
libpng.lib
zlib.dll
zlib.lib
openjp2.dll
openjp2.lib
jpeg62.pdb
turbojpeg.pdb
libde265.pdb
libde265.dll
libx265.dll
libx265.lib
x265.lib
x265.exe
libx265.exp
libde265.lib
de265.exp
libpng3.dll
libpng12.dll
zlib1.dll

Is there something I missed? How can I do to this? 

Environment: Windows 11 24H2
--- end body ---

None