CMake: Fix introspection on Windows
The list of source files to pass to g-ir-scanner is becoming too long for Windows, as Windows imposes a 8192-character limit for command lines, so we need to first transform that list into a listings file, and then use the --filelist option for g-ir-scanner to build the introspection files.
This commit is contained in:
parent
831d4a2dab
commit
e9b8002a60
|
@ -646,6 +646,11 @@ if (HB_HAVE_INTROSPECTION)
|
||||||
endif ()
|
endif ()
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
|
file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/src/hb_gir_list)
|
||||||
|
foreach (s ${introspected_sources})
|
||||||
|
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/src/hb_gir_list "${s}\n")
|
||||||
|
endforeach ()
|
||||||
|
|
||||||
# Finally, build the introspection files...
|
# Finally, build the introspection files...
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET harfbuzz-gobject
|
TARGET harfbuzz-gobject
|
||||||
|
@ -675,9 +680,9 @@ if (HB_HAVE_INTROSPECTION)
|
||||||
--library=harfbuzz
|
--library=harfbuzz
|
||||||
-L${hb_libpath}
|
-L${hb_libpath}
|
||||||
${extra_libs}
|
${extra_libs}
|
||||||
${introspected_sources}
|
--filelist ${CMAKE_CURRENT_BINARY_DIR}/src/hb_gir_list
|
||||||
-o ${hb_libpath}/HarfBuzz-0.0.gir
|
-o ${hb_libpath}/HarfBuzz-0.0.gir
|
||||||
DEPENDS harfbuzz-gobject harfbuzz
|
DEPENDS harfbuzz-gobject harfbuzz ${CMAKE_CURRENT_BINARY_DIR}/src/hb_gir_list
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
|
|
Loading…
Reference in New Issue