Skip to content

Commit aa92c82

Browse files
committed
gate dll hell behind WIN32
1 parent 46fa972 commit aa92c82

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/driver/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ if (TARGET shady_fe_llvm)
1919
target_link_libraries(vcc PRIVATE driver api common)
2020
install(TARGETS vcc EXPORT shady_export_set)
2121

22-
add_custom_command(TARGET vcc POST_BUILD
23-
COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:vcc> $<TARGET_RUNTIME_DLLS:vcc>
24-
COMMAND_EXPAND_LISTS
25-
)
22+
if (WIN32)
23+
add_custom_command(TARGET vcc POST_BUILD
24+
COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:vcc> $<TARGET_RUNTIME_DLLS:vcc>
25+
COMMAND_EXPAND_LISTS
26+
)
27+
endif ()
2628
endif ()

src/shady/generator/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ function(add_generated_file)
1919

2020
# This hacky job is required for being able to run built targets in-place when generating the code
2121
# This is also required for the various drivers but since they're built in the same directory it will work for now
22-
add_custom_command(TARGET ${GENERATOR_NAME} POST_BUILD
23-
COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:${GENERATOR_NAME}> $<TARGET_RUNTIME_DLLS:${GENERATOR_NAME}>
24-
COMMAND_EXPAND_LISTS
25-
)
22+
if (WIN32)
23+
message("copying DLLs: ${TARGET_DLLS}")
24+
add_custom_command(TARGET ${GENERATOR_NAME} POST_BUILD
25+
COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:${GENERATOR_NAME}> $<TARGET_RUNTIME_DLLS:${GENERATOR_NAME}>
26+
COMMAND_EXPAND_LISTS
27+
)
28+
endif ()
2629
endfunction()

0 commit comments

Comments
 (0)