file (GLOB_RECURSE SOURCES src/*.cpp) if(MSVC OR WIN32) add_library (cuda-stub STATIC ${SOURCES}) else() add_library (cuda-stub SHARED ${SOURCES}) endif() set_target_properties(cuda-stub PROPERTIES OUTPUT_NAME cuda) target_compile_definitions(cuda-stub PRIVATE __CUDA_API_VERSION_INTERNAL) if (MSVC OR WIN32) target_link_libraries(cuda-stub PRIVATE -Wl,--no-undefined) else() target_link_libraries(cuda-stub PRIVATE dl -Wl,--no-undefined) endif() install (TARGETS cuda-stub EXPORT ${MGE_EXPORT_TARGETS})