mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
comply with older CMake versions (dependency graph)
This commit is contained in:
parent
de4fa6439a
commit
9c22b7d1c2
1 changed files with 12 additions and 4 deletions
|
@ -185,6 +185,17 @@ function(add_compiled_library cfile)
|
||||||
PREFIX "")
|
PREFIX "")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
if(BUILD_SHARED_LIBS)
|
||||||
|
# This makes sure we only use the separate bootstrap executable for static
|
||||||
|
# builds. With dynamic linking, the default executable is fine. The dispatch
|
||||||
|
# is not a generator expression within the actual custom command to process
|
||||||
|
# the stubs, as older CMake versions fail to properly construct the dependency
|
||||||
|
# on the bootstrap executable from the generator expression.
|
||||||
|
set(bootstrap chibi-scheme)
|
||||||
|
else()
|
||||||
|
set(bootstrap chibi-scheme-bootstrap)
|
||||||
|
endif()
|
||||||
|
|
||||||
function(add_stubs_library stub)
|
function(add_stubs_library stub)
|
||||||
get_filename_component(stubdir ${stub} PATH)
|
get_filename_component(stubdir ${stub} PATH)
|
||||||
get_filename_component(basename ${stub} NAME_WE)
|
get_filename_component(basename ${stub} NAME_WE)
|
||||||
|
@ -197,10 +208,7 @@ function(add_stubs_library stub)
|
||||||
|
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${stubout}
|
add_custom_command(OUTPUT ${stubout}
|
||||||
# This makes sure we only use the separate bootstrap executable for static
|
COMMAND ${bootstrap} ${chibi-ffi} ${stubfile} ${stubout}
|
||||||
# builds. With dynamic linking, the default executable is fine.
|
|
||||||
COMMAND $<IF:$<BOOL:${BUILD_SHARED_LIBS}>,chibi-scheme,chibi-scheme-bootstrap>
|
|
||||||
${chibi-ffi} ${stubfile} ${stubout}
|
|
||||||
DEPENDS ${stubfile} ${chibi-ffi}
|
DEPENDS ${stubfile} ${chibi-ffi}
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue