-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SlangConfig.cmake with slang build targets #5674
base: master
Are you sure you want to change the base?
Conversation
I need to reformat the CMakeLists file. |
I am not able to make the wasm build work, so probably I need to skip adding slang as target. I tried to add through this macro: macro(export_slang_targets)
set(SlangExportTargetList)
foreach(target IN ITEMS ${ARGN})
message(STATUS "----------------> ADDING TARGET ${target}")
if(TARGET ${target})
list(APPEND SlangExportTargetList ${target})
endif()
endforeach()
if (SlangExportTargetList)
install(TARGETS ${SlangExportTargetList} EXPORT SlangExportTarget)
install(
EXPORT SlangExportTarget
FILE ${PROJECT_NAME}Targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION cmake
)
install(
FILES
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION cmake
)
endif()
endmacro()
#
export_slang_targets(
core
prelude
unordered_dense
compiler-core
slang-capability-defs
slang-capability-lookup
slang-reflect-headers
slang-lookup-tables
SPIRV-Headers
slang-common-objects
slang
) But other issues crop up if I do so, notably : Target "slang-reflect-headers" INTERFACE_INCLUDE_DIRECTORIES property Exporting all targets specified in SlangTargets is also not an option because it seems SlangTargets include every target declared within the library and they should not be linked to (for ex. executable targets). For my use-case, only single |
It might be ok to just not try to find a prebuilt version of Slang when cross-compiling with emscripten (i.e., enclose the |
Yes, I missed your point earlier. I will try that. Thanks for clarifying. |
Closes #5649