reactos/sdk/lib/pathcch/CMakeLists.txt
Hermès Bélusca-Maïto db96138813
[SDK][KERNELBASE][PATHCCH] Compile a collection of PathCch libraries (#8085)
CORE-12686

This collection of libraries consist in:

- a down-level `pathcch_static` PathCch library, to be used for programs
  that need to run on Windows 7 and below;

- Windows 8+ compatible libraries importing from either kernelbase.dll
  (`pathcch_kernelbase`), or from the corresponding APISET
  api-ms-win-core-path-l1-1-0.dll (`pathcch`, which is Win8+ PSDK
  compatible).

The down-level static library is compiled by reusing the newly-introduced
kernelbase's path.c, instead of using a specific pathcch.c.
Unrelated functions are excluded from compilation by putting them into
`#ifndef STATIC_PATHCCH ..... #endif` blocks.
2025-06-24 16:48:03 +02:00

11 lines
643 B
CMake

# Down-level static PathCch library, to be used for
# programs that need to run on Windows 7 and below.
add_library(pathcch_static STATIC ${REACTOS_SOURCE_DIR}/dll/win32/kernelbase/wine/path.c)
add_dependencies(pathcch_static xdk)
target_compile_definitions(pathcch_static PRIVATE wcsnicmp=_wcsnicmp STATIC_PATHCCH)
# Windows 8+ compatible libraries, importing from either
# kernelbase.dll or api-ms-win-core-path-l1-1-0.dll
generate_import_lib(pathcch_kernelbase kernelbase.dll pathcch.spec "--version=${DLL_EXPORT_VERSION}" "")
generate_import_lib(pathcch api-ms-win-core-path-l1-1-0.dll pathcch.spec "--version=${DLL_EXPORT_VERSION}" "")